0

Hey guys I have a problem with my login form.I made a site and i run that site on xampp localhost and it's work fine, but then I transferred files to web hosting and my login form show this error : "Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given ... on line 39" Code in this line is :

$login_check = mysql_num_rows($sql);
       If login check number is greater than 0 (meaning they do exist and are activated)
        if($login_check > 0){ 
                while($row = mysql_fetch_array($sql)){

`

Please can someone help me, this is very important to me.Thank you.

2
Contributors
3
Replies
4
Views
5 Years
Discussion Span
Last Post by diafol
0

Check that your tables and fields are valid. This suggests that the SQL is wrong. Is your remote DB an exact copy of the local DB?

0

45 Seconds Ago
Flag Bad Post

0

Check that your tables and fields are valid. This su

Hey yes everything with sql is allright because i just took backup and upload to web.

0

OK suppose this:

$q = "SELECT ..."; //your query
echo $q;
$sql = mysql_query($sql);
...

Copy the sql string from the screen and paste into the SQL/Query box in phpMyAdmin. Run the query. Look for errors. This tends to be easier that trying to decipher the SQL error msg via php.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.