Well, basically I am making my log in script. This is my first website with php and MySQL... actually, its my first website I have done that isn't for a school project.
Anywho, the problem I am having is I can't seem to verify the password of the account I am trying to log into.
Here is the code snippet I am having trouble with:
$usr = $_REQUEST['Username'];
$pass = $_REQUEST['Password'];
$pass = md5($pass);
if(mysql_query('SELECT Password FROM Accounts WHERE Username = "' .$usr . '"') == $pass)
{
session_start();
$_SESSION['loggedin'] = yes;
$_SESSION['User'] = $usr;
$_POST['info'] = ("You have successfully logged in " . $usr . ".");
} else { $_POST['info'] = "Username and password do not match.";}
The problem is that it doesn't seem to matter if the username and password are correct, it always prints "Username and password do not match.".
So, here is the table layout of 'Accounts':
Did I type the mysql query wrong?