我正在寻找一种方法来通知有登录凭据失败,这样用户:PHP isset失败的用户登录
因此,在index.php文件顶部(在那里登录并重定向到如果失败的登录)我有:
<?php
if (isset($fail)) {
echo "<p>Failed Login</p>";
}
?>
并为凭证的检查是这样的:
if($ensure_credentials) {
$_SESSION['status'] = 'authorized';
$_SESSION['username'] = $un;
header("location: ../".$un.".php");
} else {
header("location: ../index.php");
echo $fail;
}
目前,重定向的工作,他们没有得到登录,但通知的心不是让呼应?
在浏览器重定向 – 2011-01-20 11:19:12