我的错误是:
警告:mysql_fetch_array()期望参数1为资源,布尔值为
这是我的代码:
if (!$error) {
$password = hash('md5', $pass); // password hashing using MD5
$res=mysql_query("SELECT userId, userName, userPass FROM users WHERE userEmail='".$email."'");
$row=mysql_fetch_array($res);
$count = mysql_num_rows($res); // if uname/pass correct it returns must be 1 row
echo $row['userPass'];
echo $password;
if($row['userPass']==$password ) {
$_SESSION['user'] = $row['userId'];
header("Location: home.php");
} else {
$errTyp = "danger";
$errMSG = "Incorrect Credentials, Try again...";
}
}
找不到任何错误......我现在正在寻找1小时。我现在知道我的代码中必定存在错误。但是找不到任何东西......