Hey guys,
Alright, I think I've made some kind of advance on this problem. Here's my code:
$result = mysql_query("SELECT * FROM members WHERE email='$loginEmail' AND password='$loginPassword'", $db);
if(mysql_result($result,0,"nickname")) {
printf("Welcome, %s", mysql_result($result,0,"nickname"));
} else {
$error = "<p><b>Sorry! Your username and password didn't match! Try again</b>";
// Display page intro's
displayIntro(basicIntro(), basicTitle());
displayForm($error);
}
Now, it's checking my username/password correctly, without letting me gain access by putting in half the username or half the password. But it's giving me this warning each time the username/password doesn't match the database (in fact, it gives me this warning for every query that returns nothing. Including query's that are in if statements, checking to see if there is anything that results from that query):
Warning: Unable to jump to row 0 on MySQL result index 2
So, there's one more little thing (that warning) and I'm sure I'm not the first to encounter it. What can I do to keep that warning from happening?
Thanks for all your help everyone, and I really mean that
-dave