I'm trying to hash the users password using md5 but I can't log in. It store the password hashed but when I do the login it doesn't work.Why? These are the functions (before I started using md5 it worked)
function checkLogin($username, $password)
{
$password=md5($password);
$checkLogin = "select * from users where username='$username' AND password='$password'";
$check = mysql_query($checkLogin);
return mysql_num_rows($check) > 0 ? true : false;
}
function setRegistration($username, $password) {
$query = "insert into users (username, password) values('$username' , md5('$password'))";
mysql_query($query)
or die (mysql_error());
}