Re: [PHP] ending a session

2002-09-06 Thread Erwin
Raphael Hamzagic wrote: Thanks, But, if the client don't accept cookies? And if the user open a new browser window with the same url, the new window will use the same opened session. If the user opens a new window, without closing the old one first, then it will use the same session. If

Re: [PHP] ending a session

2002-09-06 Thread Erwin
Victor wrote: Why not unregistered the session variables first, destroy the session second and redirect the user with a header location to a plain html page that includes a one line JavaScript in the body tag like onload+thiswindow cloase or something like that, and a message that please

Re: [PHP] ending a session

2002-09-05 Thread Rasmus Lerdorf
Because there is absolutely no way for PHP to know that the user has closed the browser window. Nothing is sent from the browser to the server on a window close. By using session cookies (cookies without a specified expiry time) the session is effectively ended since the cookie is gone once the

Re: [PHP] ending a session

2002-09-05 Thread Gurhan Ozen
You can end the session by using function session_destroy(). See: http://www.php.net/manual/en/function.session-destroy.php For general information on how PHP handles sessions see: http://www.php.net/manual/en/ref.session.php Hope this helps. Gurhan On Thu, 2002-09-05 at 17:17, Raphael

Re: [PHP] ending a session

2002-09-05 Thread Raphael Hamzagic
Thanks, But, if the client don't accept cookies? And if the user open a new browser window with the same url, the new window will use the same opened session. I'm having trouble with this Thanks, Raphael Rasmus Lerdorf [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL

Re: [PHP] ending a session

2002-09-05 Thread Raphael Hamzagic
Of course Gurhan, I have read all the php manual. How can I send a message when the user closes the browser to destroy the session? Thanks in advance Raphael Gurhan Ozen [EMAIL PROTECTED] wrote in message 1031261344.5091.266.camel@LOCALHOST">news:1031261344.5091.266.camel@LOCALHOST... You

Re: [PHP] ending a session

2002-09-05 Thread Gurhan Ozen
Ohhh, I see what you are looking for.. You have to play around with some javascript to do it. Have a logout.php file, and destroy session in that file ... And in the main page, have the javascript to open up a new window with logout.php page. Makes sense? I hope this helps. Gurhan On Thu,

Re: [PHP] ending a session

2002-09-05 Thread Gurhan Ozen
A little addition/clarification, I mean in the main page, have the javascript open up a new window with logout.php file when the user closes the browser. Gurhan On Thu, 2002-09-05 at 18:04, Gurhan Ozen wrote: Ohhh, I see what you are looking for.. You have to play around with some javascript

RE: [PHP] ending a session

2002-09-05 Thread victor
as far as I know. - Victor www.argilent.com -Original Message- From: Raphael Hamzagic [mailto:[EMAIL PROTECTED]] Sent: Thursday, September 05, 2002 5:32 PM To: [EMAIL PROTECTED] Subject: Re: [PHP] ending a session Of course Gurhan, I have read all the php manual. How can I send