$con = mysql_connect("xx","xx","xx");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db("ban", $con);
$pass=$_POST["password"];-------------> line 10
$mail=$_POST["email"];----------------->line 11
$result31 = mysql_query
("SELECT * FROM `users` WHERE email = '$mail'AND password='$pass'");
$login_check = mysql_num_rows($result31);
echo $login_check;
mysql_close($con)
這是一個登錄系統的一部分,但它工作不正常PHP的登錄系統問題
錯誤我得到的是: -
Notice: Use of undefined constant password - assumed 'password' in D:\wamp\www\phpadder.php on line 10
Notice: Use of undefined constant email - assumed 'email' in D:\wamp\www\phpadder.php on line 11
Warning: mysql_num_rows() expects parameter 1 to be resource, string given in D:\wamp\www\phpadder.php on line 17
有什麼錯呢?
哪裏是行代碼 – Ibu 2011-05-26 09:42:50
10我猜你在你的問題檢查正確寫的,如果你在你的代碼 – Ibu 2011-05-26 09:49:01
寫同樣的方式我寫的一樣有問題 – 2011-05-26 09:52:49