checkpassword.php
<?php
session_start();
if (empty($_SESSION[pagecheck]))
{
if (empty($_POST[logname]) or empty($_POST[logpass])) {$check=$_COOKIE[cktime]+1;
setcookie=('cktime',$check,TIME()+300)
echo 'You did not input the login name or password.';
exit;
}elseif ($_POST[logname]=='admin' and $_POST[logpass]=='adminpass') {
$_SESSION [pageecheck]==time();
} else {$check=$_COOKIE[cktime]+1;setcookie=('cktime',$check,TIME()+300)echo 'The login name or password is incorrect <p> <a href="login.php">Tray Again</a></p>';
exit;
}
}
?>
session_start();
if (empty($_SESSION[pagecheck]))
{
if (empty($_POST[logname]) or empty($_POST[logpass])) {$check=$_COOKIE[cktime]+1;
setcookie=('cktime',$check,TIME()+300)
echo 'You did not input the login name or password.';
exit;
}elseif ($_POST[logname]=='admin' and $_POST[logpass]=='adminpass') {
$_SESSION [pageecheck]==time();
} else {$check=$_COOKIE[cktime]+1;setcookie=('cktime',$check,TIME()+300)echo 'The login name or password is incorrect <p> <a href="login.php">Tray Again</a></p>';
exit;
}
}
?>
沒有留言:
張貼留言