I have a website that allows users to register and create personal profiles. The information will be written into an SQL server 2000 database. I need a way of knowing how many members are currently online at any given time. I am able to record the members username once he/she has logged in but cannot tell when the user has logged out or closed the browser.
When Person A logs in and looks at Person Bs profile, I want Person A to know whether B is currently online.
Anyone?
:oWhen a user logs in, set a field in the database that signifies that the user is currently logged on. Handle the Session End event as well as the logout page where the session is abandoned, and in there, set the field to 0 to signify that they are not online.
Thanks for your reply
I have code in the session End event to update the SQL DB but I cannot trap this event to execute this update procedure. When the user closes the browser this event doesn't fire at all.
From the codebank (http://www.vbforums.com/showthread.php?t=391028)
From the codebank (http://www.vbforums.com/showthread.php?t=391028)
I had forgotten about that :blush:
Clax, the session times out, by default, after 20 minutes. The code will fire then.
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment