Autenticate/UnAuthenticate Problem
Posted: Wed Dec 03, 2003 4:54 am
Hi all,
I use something like the follwoing script to autenticate a user.
I works fine for autentication.
My problem is : How to UNAuthenticate (using a button or a link) in order to enable another user to autenticate himself whitout having to close the browser:
thank“s in advance
I use something like the follwoing script to autenticate a user.
I works fine for autentication.
My problem is : How to UNAuthenticate (using a button or a link) in order to enable another user to autenticate himself whitout having to close the browser:
Code: Select all
<?php
$login = "username";
$password = "password";
function error ($error_message) {
echo $error_message."<BR>";
exit;
}
if ( (!isset($PHP_AUTH_USER)) || ! (($PHP_AUTH_USER == $login) && ( $PHP_AUTH_PW == "$password" )) ) {
header("WWW-Authenticate: Basic enter="Secured Area"");
header("HTTP/1.0 401 Unauthorized");
error("You are not authorized!");
}
?>