Fortunately, this application is still in testing, therefore the users and
passwords in the db are meaningless. However, I thought storing encrypted
passwords in a db was a good idea, that is if can retrieve the decrypted
password. Can this be done?
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, December 19, 2001 12:29 PM
To: Zach Curtis
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP-DB] Decrypting PASSWORD() from MySQL
Well, it's (intended to be) difficult. Perhaps you can NULL it out and
have them put in a new password...
On Wed, 19 Dec 2001, Zach Curtis wrote:
> I have a form for a user to request their forgotten username and password
> entering their email address. I then process this and use mail() to send
> them their username and password. However, the password is stored in an
> encrypted PASSWORD('password') field in the MySQL table. How can I
> the decrypted password in a SELECT statement?
> For example, the following results in retrieving the encrypted password.
> $result = mysql_query("SELECT userName,password,email FROM members WHERE
> if (!$result)
> echo "<p>Could not execute database query:<br>" .
> mysql_error() . "</p>";
> $row = mysql_fetch_array($result);
> $userName = "$row[userName]";
> $password = "$row[password]";
> $email = "$row[email]";
> Thank you.
> Zach Curtis
> PHP Database 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]
PHP Database 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]