<?php
if(!isset($PHP_AUTH_USER) || (isset($logout))) {
header("WWW-Authenticate: Basic realm=\"Your Realm\"");
header("HTTP/1.0 401 Unauthorized");
echo "Your custom 401 message here\n";
exit;
} else {
echo "<p>Hello $PHP_AUTH_USER.</p>";
echo "<p>Your password is $PHP_AUTH_PW.</p>";
echo "<form><input type=submit name=logout value=Logout></form>";
}
?>
Ray Todd Stevens wrote:
>
> I am working on a web site that is using php controled www-
> authenticate authentication. User ids are specific to users and
> different pages and different levels of information for a given page
> will be displayed based on the user id used. The problem is how do
> you log out without having to quit all browser sessions. Anyone
> doing this? Care to share code that makes it work?
> --------------------------------------------------------------------
> --------------
> Ray Todd Stevens Specialists in Network and Security
> Consulting
> Senior Consultant Software audit service available
> Stevens Services
> Suite 21
> 3754 Old State Rd 37 N
> Bedford, IN 47421
> (812) 279-9394
> [EMAIL PROTECTED]
>
> Thought for the day:
> Concerto (n): a fight between a piano and a pianist.
>
> For PGP public key send message with subject
> please send PGP key
>
> If this message refers to an attachment the attachment
> may arrive as a seperate mail message depending on the
> type of mail client and gateway software you are using.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php