|
-
Oct 17th, 2003, 02:47 AM
#1
Thread Starter
Lively Member
Updating DB when a user leaves my site...
Hi,
I need to keep track of users connected to my site at one time. So when a user logs in its easy to just update a counter of users. But, when a user leaves my site, they might just close the page, and not log out, so...how do I update the db if they just close the page?
Is there a server side function that can be called onExit of a web site???
Thanks in advance
You are living a pacifist dream, and if you dreaming it means you sleeping and you should damn well wake up!
-
Oct 17th, 2003, 03:02 AM
#2
You could either do it when the session times out (by default, it's about 20 minutes).
Or, using javascript, when the user closes the current window, a tiny window opens up which simply updates the database that the user has left the "building"
HTH
-
Oct 17th, 2003, 03:43 AM
#3
Thread Starter
Lively Member
Great, thanks
whats the Javascrip function for when a window has been closed?
Also, what about if the user exits my site by entering a new url, and doesnt close the window?
You are living a pacifist dream, and if you dreaming it means you sleeping and you should damn well wake up!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|