comparing a string to a password encrypted file in MySQL
| From: | Don | Date: | Thu, 22 May 2003 19:50:03 +0000 |
| Subject: | comparing a string to a password encrypted file in MySQL | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-148627@lists.php.net to get a copy of this message | ||
Hi,
I have a table holding usernames/passwords where the passwords have been
one-way encrypted using the password() function.
The user is entering his/her password in plain text. How do I compare it
with the encrypted password field in my MySQL table?
Caveat: I first want to retrieve the row based ONLY on the username. Then,
I want to check if the password is correct. I can't seem to find a PHP
equivalent of the MySQL password() function.
Thanks,
Don
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.483 / Virus Database: 279 - Release Date: 5/19/2003