-1
if ($_SERVER['REQUEST_METHOD'] == 'POST')
{
include 'verify.php';
$verify = new Verify();
$vali = $verify->VerifyUserLogin($_POST['UserEmail'], $_POST['Password']);
if($_SESSION['umUser'] == true)
{
header("Location: ../index.php");
}
else
{
$errorLogin = $_SESSION['loginForm'];
}
}
function VerifyUserLogin($userEmail, $password)
{
$this->connect();
$pass = md5($password);
$result = mysql_query("SELECT * FROM umuser where umUserIsAdmin = 1 and umUserEmail = '".mysql_real_escape_string($userEmail)."' and umUserPassword = '".mysql_real_escape_string($pass)."'");
if (mysql_num_rows($result) > 0)
{
while($row = mysql_fetch_array($result))
{
$_SESSION['umAnanymousGid'] = $row['umUserGID'];
$_SESSION['umUserName'] = $row['umUserName'];
$_SESSION['umUserEmail'] = $row['umUserEmail'];
$_SESSION['umUserId'] = $row['umUserID'];
$_SESSION['umUser'] = true;
}
//echo $_SESSION['umUser'];
//header('Location:../');
}
的問題是它不是重定向到的位置和generting警告 警告:不能更改頭信息 - 頭已經(由......開始輸出)
Kindly幫助
感謝
的'輸出開始錯誤是能夠確切地告訴你問題出在哪裏的錯誤。 – andrewsi
您應該嘗試將該錯誤消息放入SO搜索框中。約5000個結果。 – jeroen