RE: [PHP] Authenticating via http
| From: | Boaz Yahav | Date: | Sun, 13 Jan 2002 14:32:32 +0000 |
| Subject: | RE: [PHP] Authenticating via http | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-80351@lists.php.net to get a copy of this message | ||
Check this out :
http://www.weberdev.com/index.php3?GoTo=search.php3%3Fsearch%3Dauthentic
ation%26searchtype%3Dtitle
Sincerely
berber
Visit http://www.weberdev.com Today!!!
To see where PHP might take you tomorrow.
-----Original Message-----
From: Paul [mailto:paul79@optonline.net]
Sent: Friday, January 11, 2002 9:49 AM
To: php-general@lists.php.net
Subject: [PHP] Authenticating via http
Here's a really quick question. I can't figure out how to try to get
user
authentication more than once. For instance, supposed I get this log on
screen that asks for my username and password. If I type in something
wrong
that variable gets stuck in $PHP_AUTH_USER, and there is no way to unset
it,
so the user would be prompted again. Please help. Thanks
<?php
if (!isset($PHP_AUTH_USER)) {
header("WWW-Authenticate: Basic realm=\"My Realm\"");
header("HTTP/1.0 401 Unauthorized");
echo "Text to send if user hits Cancel button\n";
exit;
} else {
//Check the database for user/password combination. Oh, not right?
let's try again
unset($PHP_AUTH_USER); //Doesn't work
}
?>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
For additional commands, e-mail: php-general-help@lists.php.net
To contact the list administrators, e-mail: php-list-admin@lists.php.net