Hi,
i would want to login with www-authenticate header, but i can't do the retry...
After first login, if wrong, i can't go back and retry again, because the $PHP_AUTH_USER is always set.
Anyone can tells me how i can do this?
My last not-working code...
<?
if (!isset($PHP_AUTH_USER)) {
header('WWW-Authenticate: Basic realm="my Realm"');
header('HTTP/1.0 401 Unauthorized');
echo 'User Stop';
exit;
} else {
header("Location: login.php?User=$_SERVER['PHP_AUTH_USER']");
unset($_SERVER['PHP_AUTH_USER']);
unset(PHP_AUTH_USER);
}
?>