You store it encrypted and you compare the two encrypted password for
validation. You will send it to the user before
encrypting it, how else ? And if user forget it, you reset a new one.
py


----- Original Message -----
From: Steph <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, July 13, 2001 7:04 AM
Subject: [PHP] decrypting passwords


User enters a new password through a form.  Then it is put in the table by
the following.  ($userid is the username)

$query = mysql_query("update users set password =
encrypt('$password','$userid') where userid = '$userid'")
 or die("Couldn't execute query.");

I need to know how to decrypt the password so that I can have it emailed to
the user should they forget it.

Any help would be appreciated

Thanks Steph



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to