During the registration I put the password into the db processing it with this line before to store it
$password = crypt($_POST['password']);
Into the login function I compare the passwords in this way
//$pass is the one taken from the db //$this->password is the one taken from the login form if($pass == crypt($this->password,$pass))It always results false.
I've tried to print both of the passwords and they are like this
$1$Tz0.gE..$Wg3sb2XtiyuN6kpU/Xt7 //$pass $1$Tz0.gE..$Wg3sb2XtiyuN6kpU/Xt7C1 //crypt($_POST['password'],$pass)They are the same, but to the 2nd, two characters are appended to the end, why that happens? How do I solve this problem?


Sign In
Create Account


Back to top









