Re: Logging out with authentication

From: Date: Thu, 01 Aug 2002 14:20:26 +0000
Subject: Re: Logging out with authentication
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-110670@lists.php.net to get a copy of this message
<?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 > Raytodd@kiva.net > > 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.

« previous php.general (#110670) next »