Ciao ragazzi, nei file di download ho trovato uno script che mi serviva č sensazionale.

form
config
area protetta


ora...ho visto che nell'area protetta c'č il messaggio che esce se l'utente sbaglia idati:

<?
}
else {
echo "
[b]Accesso negato, effettua in modo corretto il <a href=\"home.html\">login</a>[b]";
}
?>


č possibile fare in modo che invece di uscire una pagina bianca con la scritta esca il mio layout con sempre la dicitura accesso fallito...?

cosa dovrei modificare?


posto i tre codici..
un abbraccio
e grazie milleeee








Form:

<html>
<head>
<title>Protezione pagina</title>
</head>
<body>


Protezione pagina "pag_protetta"</p>
<form method="post" action="pag_protetta.php">


Username: <input type="text" name="username" size="20"></p>


Password: <input type="password" name="password" size="20"></p>


<input type="submit" value="Login">
<input type="reset" value="Annulla">
</form>
</body>
</html>





Config:

<?
$usern='demo'; # valore username
$passd='demolo'; # valore password
?>



AreaProtetta:
<?
include 'config.php';
$username=$_POST['username'];
$password=$_POST['password'];

if ($username==$usern && $password==$passd) {
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<body>
<div id="main">

</div>
</body>
</html>

<?
}
else {
echo "
[b]Accesso negato, effettua in modo corretto il <a href=\"home.html\">login</a>[b]";
}
?>