note 19907 added to function.crypt
| From: | gdymarskiy at php2 dot chek dot com | Date: | Thu, 14 Mar 2002 18:18:07 +0000 |
| Subject: | note 19907 added to function.crypt | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-27795@lists.php.net to get a copy of this message | ||
I had to trim both user supplied password and crypt()ed string in order for comparison to work
properly.
if (trim(crypt($user_input,$password)) == trim($password)) {
echo "Password verified!";
}
--
http://www.php.net/manual/en/function.crypt.php
http://master.php.net/manage/user-notes.php?action=edit+19907
http://master.php.net/manage/user-notes.php?action=delete+19907
http://master.php.net/manage/user-notes.php?action=reject+19907