RE: [PHP] Checking md5 password from Mysql
| From: | John W. Holmes | Date: | Thu, 17 Apr 2003 00:28:41 +0000 |
| Subject: | RE: [PHP] Checking md5 password from Mysql | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-144210@lists.php.net to get a copy of this message | ||
> Can anyone point out where to change this code to anthenticate the
> password
> which is "encrypted" using md5 in MySql? The code works for password
not
> stored using md5. Btw, the code is generated by Dreamweaver MX's PHP
> Server
> extension, using the User Authentication extension made by someone
else.
[snip]
> $FF_valPassword=$HTTP_POST_VARS['textfield2'];
That line should be:
$FF_valPassword=md5($HTTP_POST_VARS['textfield2']);
to achieve what you want. This assumes the data is already stored in an
MD5 format in your database.
---John W. Holmes...
PHP Architect - A monthly magazine for PHP Professionals. Get your copy
today. http://www.phparch.com/