----- Original Message ----- From: "Navid Yar" <[EMAIL PROTECTED]> > $query = "select email from customers" // Check for duplicate > entry > . "where email = $email"; > $query = stripslashes($query); > $result = mysql_query($query); > > $num_results = mysql_num_rows($result); // Get the number of > rows in database (integer) > And this produces the following error: > Warning: Supplied argument is not a valid MySQL result resource in > e:\localhost/book-o-rama/admin/signup_do.php on line 34. > > What am I doing wrong? Any help would be appreciated...
You are not checking to see if the mysql_query completed successfully. What you could do is: $result = mysql_query($query) or die(mysql_error()); http://www.php-faq.com/faq.php#10 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php