Re: A weired browser-session problem
| From: | Chris Shiflett | Date: | Sun, 22 Sep 2002 14:49:28 +0000 |
| Subject: | Re: A weired browser-session problem | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-117164@lists.php.net to get a copy of this message | ||
Monil,
First, from the perspective of the Web server, there is only one browser. Also, there is no way to know when a user closes a browser.
So, your problem just sounds like PHP is *maintaining* the session, which is exactly what it is supposed to do. :-) It is your job to maintain the data associated with a particular session, and there are functions to help you destroy data in a session, or you can simply reinitialize all of your session variables when the user first selects an option from the menu.
Happy hacking.
Chris
Monil Chheda wrote:
The following is my problem. 1) User with valid username and password is given an Administration Menu. 2) Various options are there. He selects a particular option. 3) The selected option is opened in a new page. 4) He does his job on the new window. But midway ( say after 2 pages ), after making a few chioices, he closes the newly opened window,leading to some variables being registered 5) Now , after some time , selects the same option. 6) Makes his selection. But , he gets the choices that he had used previous time inspite of him closing the window . How do I get rid of the problem ? I would like that even if the user closes the browser midway and then again checks the same , his new sessions should be registered and not the old. Is there a way wherein we can destroy the sessions of the new browser window as soon as the browser is closed ?