Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need Help!

Status
Not open for further replies.

buzzt

Programmer
Oct 17, 2002
171
CA
I'm still fairly new to PHP. Can somebody tell me what I done wrong here? I keep getting the error Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in <<FILENAME>> line 10 (which is the line &quot;if( mysql_num_rows...&quot;


$result = mysql_query(&quot;select membid from members where username='$username' and sessionid='$sessionid'&quot;);

if( mysql_num_rows($result) == 1 ) $membid = mysql_result($result,0,0);
else $membid = 0;
if($membid > 0) {
mysql_query(&quot;update members set active='y' where membid='$membid'&quot;) or die(mysql_error());
}
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top