When a user registers on my site I insert their password into the database like this using the encrypt function (the database is mysql);
$qry = "INSERT INTO members(firstname, lastname, email, login, passwd) VALUES ('$fname','$lname','$email', '$login',ENCRYPT('$password'))";
When i match it when they login I use this query but it doesnt seem to be working;
$qry="SELECT * FROM members WHERE login='$login' AND passwd = ENCRYPT('$password')";
Why does this not work?