hi, i think $PHP_AUTH_USER will only get unset the next time session_start() is called. try to use a header("location: ...") to direct your logout page to your index page and then print $PHP_AUTH_USER right after session_start().. by right, you should not have any value... i faced the same problem and was puzzled for quite some time, but i think this works.. hth hwee ----- Original Message ----- From: "Constantin Brinzoi" <aurel@xxxxxxxxxx> To: <php-db@xxxxxxxxxxxxx> Sent: Monday, December 15, 2003 5:16 PM Subject: Problem with PHP_AUTH_USER > Hi! > > Here is the problem: > > How can I unset the $PHP_AUTH_USER when the user clicks "logout"? > > The authentication works very well except the log out. > I tried: > session_destroy(); > unset($_SERVER['PHP_AUTH_USER']) > > and in the next line I did: > > print $PHP_AUTH_USER; > > and the value is still there. > > How can I unregister this variable so that the authentication window > appears again. > > I'm using apache 2.0.40, php 4.2.2 compiled as a module, RedHat Linux > 9.0. Register globals is On. > > TIA > Constantin Brinzoi. > > -- > PHP Database Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php