RE: [PHP] Checking md5 password from Mysql

From: Date: Thu, 17 Apr 2003 03:29:00 +0000
Subject: RE: [PHP] Checking md5 password from Mysql
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-144223@lists.php.net to get a copy of this message
There's no reason it shouldn't work. How does it "not work"? Are you storing the data in the correct column type? The column should be a VARCHAR(32) to hold the result of the md5(). ---John W. Holmes... PHP Architect - A monthly magazine for PHP Professionals. Get your copy today. http://www.phparch.com/ > -----Original Message----- > From: Dennis Martin [mailto:dennis@indigohue.com] > Sent: Wednesday, April 16, 2003 10:19 PM > To: holmes072000@charter.net > Subject: RE: [PHP] Checking md5 password from Mysql > > I've tried that, but it didn't worked for my script. Yes, the data is > stored > in MD5 in MySql. So couldn't figure out where to change the code. > > Dennis > > -----Original Message----- > From: John W. Holmes [mailto:holmes072000@charter.net] > Sent: Thursday, April 17, 2003 8:29 AM > To: 'Dennis Martin Ong'; php-general@lists.php.net > Subject: RE: [PHP] Checking md5 password from Mysql > > > > 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/ > > >

« previous php.general (#144223) next »