note 25252 added to function.md5
| From: | mrhatch at lehr-reich dot de | Date: | Mon, 16 Sep 2002 23:34:27 +0000 |
| Subject: | note 25252 added to function.md5 | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-36760@lists.php.net to get a copy of this message | ||
Oh, this is an odd problem:
I have a password [md5(serialize($userpass)] which I insert into a mysql-table. When I log in to my
site via a form, I do the following:
onsubmit:
$userpass=md5(serialize($userpass));
SELECT userid, username, userpass FROM tbluser;
Then I compare both strings, and it always says "Wrong password". I found out, that the
hash inserted into the table is completely different from the one I generate in the script.
What am I doing wrong?
--
http://www.php.net/manual/en/function.md5.php
http://master.php.net/manage/user-notes.php?action=edit+25252
http://master.php.net/manage/user-notes.php?action=delete+25252
http://master.php.net/manage/user-notes.php?action=reject+25252