Re: Case sensitive password

From: Date: Thu, 19 Jun 2008 05:16:42 +0000
Subject: Re: Case sensitive password
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-275570@lists.php.net to get a copy of this message
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/

« previous php.general (#275570) next »