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:[EMAIL PROTECTED]]
Sent: Friday, January 11, 2002 9:49 AM
To: [EMAIL PROTECTED]
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to