On Thu, Jun 19, 2008 at 7:29 PM, Kyle Browning <nomspes@xxxxxxxxx> wrote: > 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@xxxxxxxxxxxxxxxxxxx> wrote: > >> Thank you Daniel, I think that did the trick. Am checking this out now... >> >> Best >> R.C. >> >> ""Daniel Brown"" <parasane@xxxxxxxxx> 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"; >> > } >> > >> > ?> Because that would make the password comparison case-sensitive (as one might reasonably infer from the subject of the message). However, the OP wanted the password to be case-INsensitive. Andrew -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php