Re: Case sensitive password

From: Date: Thu, 19 Jun 2008 05:04:43 +0000
Subject: Re: Case sensitive password
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-275569@lists.php.net to get a copy of this message
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. Is this what you are recommending below? Best R.C. "Chris" <dmagick@gmail.com> wrote in message news:4859E3B0.1060606@gmail.com... > R.C. wrote: > > I have coded a php page that accepts a password. What is the code to make > > sure the password entered is NOT case-sensitive? > > Before you store the password, make it all lowercase (or uppercase, > whatever you prefer). > > $password = strtolower($password); > > > When you compare the passwords, turn it all to lower (or upper) case > before you compare it. > > > -- > Postgresql & php tutorials > http://www.designmagick.com/

« previous php.general (#275569) next »