[PHP] Re: Logging out with authentication
?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 pHello $PHP_AUTH_USER./p; echo pYour password is $PHP_AUTH_PW./p; echo forminput 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 ConsultantSoftware 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
[PHP] Re: Logging out with authentication
You could redirect to a file outside the 'realm' by using header(location: ) or just linking to it. -- JJ Harrison [EMAIL PROTECTED] www.tececo.com Ray Todd Stevens [EMAIL PROTECTED] wrote in message 3D44690D.25129.D620734@localhost">news:3D44690D.25129.D620734@localhost... 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 ConsultantSoftware 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