I have a form for a user to request their forgotten username and password by entering their email address. I then process this using PHP 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 retrieve 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 email='$email'"); 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 Programmer/Analyst POPULUS --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php