I have a program that checks two login fields against a mysql db table. The code is like this:
$result=mysql_query("SELECT UserName FROM Login");
$UserName=mysql_result($result,"UserName");
$result2=mysql_query("SELECT UserPass FROM Login");
$UserPass=mysql_result($result2,"UserPass");
//########################################################### Process Login
if(($UserID=="$UserName") && ($Pass=="$UserPass")){
But that only allows for one user. If I want to add a second user, how could I make it go like this:
find USER in table, once found, match password entered, if they match, display page.
I can only get it to look at one row, not two rows with two usernames and passwords. I know this must be so simple but I can't figure it out!