Re: $PHP_AUTH_USER

From: Date: Thu, 03 Aug 2000 18:16:53 +0000
Subject: Re: $PHP_AUTH_USER
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-9995@lists.php.net to get a copy of this message
On Thu, 3 Aug 2000 M.vanderMerwe@expro.shell.co.uk wrote: > Is $PHP_AUTH_USER case sensitive? > > I've had people sign in using lowercase names when they are registered > in the database with varying upper and lower letters and although they > are signed in they can't edit things. This is good, but how can I > prevent them from being able to log in at all if they don't use the > username they specified? > > BTW. I'm using the HTTP scenario as many of them have cookies switched > off. > > Part of the code: > if (!isset($PHP_AUTH_USER)) > { > // If empty, send header causing dialog box to appear > header('WWW-Authenticate: Basic realm="FGN Members Area"'); > header('HTTP/1.0 401 Unauthorized'); > exit; > } > > > The rest is just a validation of $PHP_AUTH_USER and $PHP_AUTH_PW aainst > entries in a MySQL members database. Well, that is the part that is important. Your MySQL query probably is not case sensitive. PHP passes the text straight through to you. You decide whether or not case should be significant. -Rasmus

« previous php.general (#9995) next »