Re: LOGOUT - Reset Session
| From: | Jason Wong | Date: | Fri, 31 Jan 2003 09:12:32 +0000 |
| Subject: | Re: LOGOUT - Reset Session | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-133750@lists.php.net to get a copy of this message | ||
On Friday 31 January 2003 15:50, Keith Spiller wrote:
> Hello Everyone,
>
> I'm trying to create a Logout Function and Link. My site uses a standard
> htaccess file for its authentication method. After the brower requests the
> username and password they have access to the protected site.
>
> Then users can jump to a special Messaging section where I wrote a php
> script that retieves the $REMOTE_USER value and checks it against a message
> database.
>
> My problem is that I'd like to have a logout link that will dump the values
> the user had entered for their username and password so that they can no
> longer access the messages, neither with a back button nor just by going
> back to the site url. But since I am retrieving the $REMOTE_USER value
> using PHP4, it seems some how it remebers the username and password.
Yes, that's because after HTTP authentication, each time the browser requests
a page it'll send the user and password as well.
> Is
> that because I need to destroy the session and remove or replace the
> session cookies? I do not know what the session name is, nor how to check
> it.
HTTP authentication are not related to sessions.
Have a look in the manual > HTTP authentication with PHP
--
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
/*
New members are urgently needed in the Society for Prevention of
Cruelty to Yourself. Apply within.
*/