note 4716 deleted from function.header by jimw
| From: | jimw@php.net | Date: | Wed, 31 Oct 2001 21:32:48 +0000 |
| Subject: | note 4716 deleted from function.header by jimw | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-19733@lists.php.net to get a copy of this message | ||
here us an example of a User Auth This is tried and proven on dtheatre.com:
if (!isset($PHP_AUTH_USER)) {
Header("WWW-Authenticate: Basic realm=\"Admin\"");
Header("HTTP/1.0 401 Unauthorized");
$REMOTE_USER = "";
$REMOTE_PASSWORD = "";
$PHP_AUTH_USER = "";
$PHP_AUTH_PW = "";
print "You hit cancel! if it was an accident please <a
href=\"$PHP_SELF\">click here</a> to try again.";
exit;
} else if ((!$PHP_AUTH_USER == "user") && ($PHP_AUTH_PW == "pass")) {
print "You are unauthorized";
}