$result=mysql_query("SELECT * FROM users WHERE pass='".sha1($_POST['mainloginpass'])."'");
if(mysql_num_rows($result)==1){
it says that “mysql_num_rows() expects parameter 1 to be resource, boolean given”
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
mysql_querynormally returns a resource, but according to the docs:mysql_query() will return FALSE on error and also fail and return FALSE if the user does not have permission to access the table(s) referenced by the query.
You may want to try something like this:
To see what the problem is.