Quote:
|
$password = crypt($_POST['password']);
|
Thats not crypt-md5 encryption. Crypt can create many different algorithms, see php manual. Take a look here on how to create a crypt-md5 password.
Code:
function crypt_password($cleartext_password) {
$salt="$1$";
$base64_alphabet='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
for ($n=0;$n<8;$n++) {
$salt.=$base64_alphabet[mt_rand(0,63)];
}
$salt.="$";
return crypt($cleartext_password,$salt);
}