Hi. Taken a long time away from PHP..anyway..straight down to business.
$result=mysql_query("select user from sspp WHERE user='$user'");
if (mysql_num_rows($result)==0) {
With that code i get the error:
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/stormst/public_html/registerc.php on line 16
Why is that? And what could i do to fix it?
N00b error
Moderator: General Moderators
- feyd
- Neighborhood Spidermoddy
- Posts: 31559
- Joined: Mon Mar 29, 2004 3:24 pm
- Location: Bothell, Washington, USA
make sure the query is valid. (echo it out).. modify to
Code: Select all
$result = mysql_query(...) or die(mysql_error());