Re: [PHP4BETA] $PHP_AUTH_USER & $PHP_AUTH_PW Question.
[email protected] (Aleksandar Ivanisevic) 19 Jun 2000 22:48:20 +0200
| Newsgroups | php.version4 |
|---|---|
| Organization | Trla baba lan Ltd. |
| Message-ID | <[email protected]> |
Ciprian Asmarandei writes:
>Hello folks, Does anybody know how to get rid of $PHP_AUTH_USER and
>$PHP_AUTH_PW variables without closing the browser?
>I am making the authorization with headers which forces the browser
>to pop up the authorization dialog. After the successful
>authorization the page displays somewhere a link "log out" which
>points to a script "logout.php".
>I tried to unset $PHP_AUTH_USER and $PHP_AUTH_PW in "logout.php" but
>it doesn't work. When I want to relogin, the browser doesn't pop up
>the authorization dialog, and enters the site with the old
>authorization values. So I must first close the browser and after
>that to reenter the site.
This is a browser feature, it sends username and password with the URL
every time after successful login, it's just not shown in the address bar.
>How can I do it without closing the browser ?
Just send a Header("HTTP/1.0 401 No cigar"); and thats it.