Im making a script, and it envolves mysql (obviously) and im just trying to check some things, and it gives me this error numerously.
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/oddlaw/public_html/brstest/members.php on line 42
Line 42 is basically this :
while ($row = mysql_fetch_array($query)){
Here are some lines around it :
$_connection = mysql_connect("localhost", "oddlaw_mem", "ssjgoku");
mysql_select_db("oddlaws_members", $_connection);
$query = mysql_query("SELECT * FROM idnumber");
while ($row = mysql_fetch_array($query)){
$pass = $row["id"];
if($pass == $_POST['password']) {
$loggedin = TRUE;
break; //stop looping if the password is found
} else {
print "
<a href="#" onClick="history.go(-1)">Wrong unique ID number,
go back and try again!</a>";
} //end if
}// end while
Well if anyone can help me on this, then please it would be much appreciated!
If anything i would just like to know what the supplied argument warning means.