Re: [PHP] $PHP_AUTH_USER From: Rasmus Lerdorf (rasmus <email protected>)
Date: 08/03/00

On Thu, 3 Aug 2000 M.vanderMerwe <email protected> 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

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-general-unsubscribe <email protected>
For additional commands, e-mail: php-general-help <email protected>
To contact the list administrators, e-mail: php-list-admin <email protected>