当我输入正确的电子邮件和错误的密码时,我看到“电子邮件不存在!” 为什么:(?
$emailnumrow = mysql_num_rows(mysql_query(" SELECT * FROM users WHERE email='$email' "));
if($emailnumrow['.$email.'] >= 1){
} else {echo 'email do not exist!';}
答案 0 :(得分:0)
mysql_num_rows
返回int
而不是array
。它应该是
if($emailnumrow >= 1){
....
}else {
echo 'email do not exist!';
}