[PHP-DB] detecting browser close or change of url

2003-07-02 Thread Jamie Saunders
Hi, I'm trying to figure out a way of detecting when a user closes the browser, or if they leave the site. If they do this I'd like to change a value in the database, i.e: if (browser is closed by user or they leave site) { // run php code to update database } Any help much appreciated. --

Re: [PHP-DB] detecting browser close or change of url

2003-07-02 Thread Oscar Rylin
PHP is server-side, not client side. That said, what you could do is simply make use of window.onunload or window.onclose in javascript to bring up a second window/page.. of course, anyone with half a brain and a popup-stopper won't get that page :) --rylin Jamie Saunders wrote: Hi, I'm

Re: [PHP-DB] detecting browser close or change of url

2003-07-02 Thread Jamie Saunders
Ok, let's explain the situation more fully: Basically I have a session controlled login system for users to my site. If they manually log-out, close the browser or move away from the site the variables that are needed for them to view the 'members area' are unset, hence they are logged out. What

RE: [PHP-DB] detecting browser close or change of url

2003-07-02 Thread Hutchins, Richard
] Sent: Wednesday, July 02, 2003 11:01 AM To: Jamie Saunders Cc: [EMAIL PROTECTED] Subject: Re: [PHP-DB] detecting browser close or change of url PHP is server-side, not client side. That said, what you could do is simply make use of window.onunload or window.onclose in javascript to bring up

Re: [PHP-DB] detecting browser close or change of url

2003-07-02 Thread Oscar Rylin
be able to use some of the suggestions in here to solve your problem. Rich -Original Message- From: Oscar Rylin [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 02, 2003 11:01 AM To: Jamie Saunders Cc: [EMAIL PROTECTED] Subject: Re: [PHP-DB] detecting browser close or change of url PHP

Re: [PHP-DB] detecting browser close or change of url

2003-07-02 Thread Pablo
On 07/02/2003 10:06 AM, Jamie Saunders ([EMAIL PROTECTED]) wrote: What I want to do is disable people logging into the same user account at the same time. If this is your goal, try reversing your way of thinking. Instead of worrying about what happens when a user logs out (or doesn't),