how could I solve the problem?
| From: | Wee Chua | Date: | Mon, 25 Sep 2000 18:17:15 +0000 |
| Subject: | how could I solve the problem? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-17445@lists.php.net to get a copy of this message | ||
Hi all,
How could I reset the value of $PHP_AUTH_USER and $PHP_AUTH_PW inside the
PHP authentication. The reason why I ask is because I want to let user to
reenter their username or password when they enter wrong at the first time.
But I don't how to do it, I tried to refresh the browser and the error page
remains the same, unless I open another new browser window to try it again.
I hope you understand my problem, any help will be appreciated. Thank you!
Here are the codes I user,
<?php
if(!isset($PHP_AUTH_USER)) {
Header("WWW-authenticate: basic realm=\"Login Required\"");
Header("HTTP/1.0 401 Unauthorized");
$title="Login screen";
}
else { // Connect to server
blah....blah....
}
Calvin