Hi, everybody. :)I met a problem and hope you can help me. Any help will be appreciated.
I developed my first php website on my computer and tested it by using my university web domain, and it worked fine. However, when I upload this website to the other web domain that I applied. One of my web page cannot work properly, and shows error message: Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/adtsfxfg/public_html/edit_user1.php on line 236. The codes are as follows:
$query = "SELECT user_name, first_name, last_name, address, postcode, tel, email, agreetolist FROM users WHERE user_id=$id";
$result = @mysql_query ($query); // Run the query.
[color=red]if (mysql_num_rows($result) == 1) { // Valid user ID, show the form.[/color]
// Get the user's information.
$row = mysql_fetch_array ($result, MYSQL_NUM);
Would you please tell me why it works on one web domain but can't work on the other web domain. And how can I solve this problems. Thank you.