Re: Session destruction problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



At 12:31 PM -0800 2/16/08, Adil Drissi wrote:
Hi everybody,

I need help with sessions.
I have a simple authentification relying only on
sessions (i don't use cookies). After the user submits
his username and password, the script checks if that
corresponds to a record in a mysql table. If this is
the case "$_SESSION['sessioname'] = $_POST['login'];".
the $_SESSION['sessioname'] is checked in subsequent
pages to see if the user is connected or not.
The problem is after the user logs out, and after that
uses the previous button of the browser he becomes
connected. How can i prevent this please.

Here is my logout.php:

<?php
session_start();
unset($_SESSION["sessioname"]);
session_destroy();
header("location: index.php");
?>

That will destroy the session, but not the browser history.

You'll need javascript to alter window history.

Google "window.history.forward"

Here's one link that may help:

http://www.4guysfromrolla.com/webtech/111500-1.2.shtml

Cheers,

tedd

--
-------
http://sperling.com  http://ancientstones.com  http://earthstones.com

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux