zach: How can I retrieve the decrypted password in a SELECT statement?

You can't!

If you want them to deal with forgotten passwords, here is a standard way:

Whenever they submit their email addresses to retrieve their passwords,
just generate a random password, and send it to the user's email address.
Then store the same password in encrypted form in the database. If they
want.

When it comes to be able to retrieve encrypted passwords, if it was
possible, it would defeat the whole purpose of encryption, wouldn't it?



 zach:
  zach: For example, the following results in retrieving the encrypted password.
  zach:
  zach: $result = mysql_query("SELECT userName,password,email FROM members WHERE
  zach: email='$email'");
  zach: if (!$result)
  zach:         echo "<p>Could not execute database query:<br>" .
  zach:                   mysql_error() . "</p>";
  zach:
  zach: $row = mysql_fetch_array($result);
  zach: $userName = "$row[userName]";
  zach: $password = "$row[password]";
  zach: $email = "$row[email]";
  zach:
  zach:
  zach: Thank you.
  zach:
  zach:
  zach: Zach Curtis
  zach: Programmer/Analyst
  zach: POPULUS
  zach:
  zach:
  zach: ---------------------------------------------------------------------
  zach: Before posting, please check:
  zach:    http://www.mysql.com/manual.php   (the manual)
  zach:    http://lists.mysql.com/           (the list archive)
  zach:
  zach: To request this thread, e-mail <[EMAIL PROTECTED]>
  zach: To unsubscribe, e-mail 
<[EMAIL PROTECTED]>
  zach: Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
  zach:

-- 
Sherzod Ruzmetov <[EMAIL PROTECTED]>
http://www.UltraCgis.com, Consultant
989.774.6265

01001010010000010101000001001100

+----------------------------------------+
| There is nothing wrong with your tools.|
| But we can make a better one.          |
+----------------------------------------+


---------------------------------------------------------------------
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

Reply via email to