Re: Case sensitive password

From: Date: Thu, 19 Jun 2008 23:29:22 +0000
Subject: Re: Case sensitive password
References: 1 2 3 4 5 6 7 8  Groups: php.general 
Request: Send a blank email to php-general+get-275657@lists.php.net to get a copy of this message
Why not md5 the password, and store the md5 encryption. Then when they type something in, md5 it and compare the md5 strings. That will ensure that it is Case Sensitive On Thu, Jun 19, 2008 at 2:04 PM, R.C. <rme@besttranslation.org> wrote: > Thank you Daniel, I think that did the trick. Am checking this out now... > > Best > R.C. > > ""Daniel Brown"" <parasane@gmail.com> wrote in message > > > session_start(); > > > > > > $_SESSION ['userpass'] = $_POST ['pass']; > > > $_SESSION ['authuser'] = 0; > > > > > > $login = "VIDEO"; > > > $login2 = "video"; > > > > > > if (($_SESSION['userpass'] == $login) or ($_SESSION['userpass'] > > > == > $login2)) > > > { > > > $_SESSION['authuser'] = 1; > > > ?> > > > > Try this: > > > > <?php > > > > if(preg_match('/^'.$_SESSION['userpass'].'$/i',$login)) { > > echo "Good.\n"; > > } else { > > echo "Bad.\n"; > > } > > > > ?> > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > >

« previous php.general (#275657) next »