rows() expects parameter 1 to be resource
This question already has an answer here:
error is there
what happen that your $mysql is putting wrong query ro the db so it return FALSE it is not wrong then mysql_query will return resource to the table...
$mysql=mysql_query("SELECT Username FROM user WHERE Username='".$_POST['Username']."');
or for example
$mysql=mysql_query("SELECT * FROM table_name WHERE Username='".$_POST['Username']."');
Your insert query is also wrong..
$sql = "INSERT INTO User (Username,Password,FirstName,LastName,Email,Address,ContactNumber) VALUES('".$_POST['Username']."','".$_POST['Password']."','".$_POST['FirstName']."','".$_POST['LastName']."','".$_POST['Email']."','".$_POST['Address']."','".$_POST['ContactNumber']."')";
链接地址: http://www.djcxy.com/p/69588.html
上一篇: PHP错误。 解析错误:语法错误
下一篇: rows()期望参数1是资源