Re: Case sensitive password
| From: | R.C. | Date: | Thu, 19 Jun 2008 15:54:29 +0000 |
| Subject: | Re: Case sensitive password | ||
| References: | 1 2 3 4 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-275612@lists.php.net to get a copy of this message | ||
Chris,
Thank you. That worked good. Appreciate the assistance.
Best
R.C.
"Chris" <dmagick@gmail.com> wrote in message
news:4859EBBA.2040501@gmail.com...
> R.C. wrote:
> > Thank you for your reply. The password is not stored, actually, like in
a
> > databse. We're only dealing with one password. When the user inputs the
> > password, he/she should be able to input either in lower or upper case
or
> > both abd they should have access to the "protected file" in this case.
>
> As Nathan mentioned, just compare them in the same way.
>
> $stored_password = strtolower($stored_password);
>
> $user_password = strtolower($user_password);
>
> if ($stored_password == $user_password) {
> echo "Yay!";
> } else {
> echo "No :(";
> }
>
> --
> Postgresql & php tutorials
> http://www.designmagick.com/