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 "if( mysql_num_rows..."
$result = mysql_query("select membid from members where username='$username' and sessionid='$sessionid'"
if( mysql_num_rows($result) == 1 ) $membid = mysql_result($result,0,0);
else $membid = 0;
if($membid > 0) {
mysql_query("update members set active='y' where membid='$membid'" or die(mysql_error());
}
$result = mysql_query("select membid from members where username='$username' and sessionid='$sessionid'"
if( mysql_num_rows($result) == 1 ) $membid = mysql_result($result,0,0);
else $membid = 0;
if($membid > 0) {
mysql_query("update members set active='y' where membid='$membid'" or die(mysql_error());
}