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. 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.
Here is what I have tried so far:
function logout() {
session_start();
session_destroy();
setcookie("SES_NAME","","","/");
header("Location: http://www.yahoo.com");
exit;
}
My results were that everytime I click the logout link, I can just press
back on the browser and go back where I was and continue using the Messaging
application.
Thank you for any help you might provide...
Larentium
[EMAIL PROTECTED]
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php