AsiaUnderworld Posted February 25, 2009 Share Posted February 25, 2009 I've moved my code to a new server, and ive now got these errors Warning mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/niccaman/public_html/checkuser.php on line 42 Warning mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/niccaman/public_html/checkuser.php on line 42 Warning mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/niccaman/public_html/checkuser.php on line 57 Warning mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/niccaman/public_html/checkuser.php on line 57 Warning cannot modify header information - headers already sent by (output started at /home/niccaman/public_html/checkuser.php:42) in home/niccaman/public_html/checkuser.php on line 24 Whats up with this? Here are the lines around 42: 37 global $con; 38 $q = "SELECT ID FROM userinfo WHERE username = '$user'"; 39 $result = mysql_query($q, $con); 40 $result = mysql_fetch_array($result) o die ('error: ' .mysql_error()); 41 $i = 0; 42 while ($i <= mysql_num_rows($result)) 43 { 44 $r = $r . $result[$i]; 45 $i++; 46 } 47 48 return $r; 49 } help would be great Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.