php - how can i check crypted password in login page? -


i encrypted password crypt() function. when user wants login how can check password stored in database 1 entered?

for ex:

$pass = "fgyi34".$pass."@1187gh";  $hashed_password = crypt($pass); 

for new user.
crypt password , store in database.

for existing user
crypt password , store in variable when user clicks submit button, compare crypted password earlier crypted password on database. if password doesn't match, display message user password wrong.


Comments