View Full Version : Members Online Session
Morgoth
11-28-2002, 01:51 AM
I have set the db to update telling me what user is online. I am just confused over the fact how I set it to false by the session timer timing out.
In my Global.asa do I just do something like this below? If so, I need something to add into the bolded text area. I don't know if I am able to use cookies before the guy leaves or something.
Sub Session_OnEnd
Set oConn = Server.CreateObject("ADODB.Connection")
StrConn = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & Server.MapPath("db.mdb") & ";"
oConn.open StrConn
ssSQL = "UPDATE Members SET Loggedin=False WHERE (ID='" & StrMyCookieForID & "')"
Set ooRS = oConn.Execute(ssSQL)
End Sub
Has anyone done this before? Please help me if you can...
oracleguy
11-28-2002, 02:28 AM
Yeah you can do that. I've done something similar awhile ago. But I'm a little confused on what you mean when you say, "I don't know if I am able to use cookies before the guy leaves or something. "
PlatinumProject
11-28-2002, 02:35 AM
not sure if this is what your looking for
http://www.developerfusion.com/show/1745/
--------------------------
this one starts here the intro
http://www.devarticles.com/art/1/197
this is the mian code here
http://www.devarticles.com/art/1/197/4
Morgoth
11-28-2002, 04:00 AM
Originally posted by oracleguy
Yeah you can do that. I've done something similar awhile ago. But I'm a little confused on what you mean when you say, "I don't know if I am able to use cookies before the guy leaves or something. "
Well, I need to change the loggedin field into False so that it doesn't just turn everyone into people online even when their not.
So really, what my question is:
How do I know which user I turn the Loggedin field into false?
I will read what PlatinumProject posted now.
Morgoth
11-28-2002, 04:07 AM
PlatinumProject :
1) The first link is just all Active Users.
2)The second link may help me acually.
I can store the ID number in a session and then use it at the end when the person leaves, but will session("ID") hold the information for everyone that comes to the page?
3) The last link is like the first.
My task:
What I need to do is store the ID number and the Username so I can place it on my site showing people who is online at the moment that is logged in with an account.
If you go to:
http://www.codingforums.com/
And go to the very bottom, there is a spot that shows you the active users on the forums at this moment. I am tried to make this application.
Thank you oracleguy thank you PlatinumProject
I am off to test out my theories. I will tell you is it works or not.
vBulletin® v3.8.2, Copyright ©2000-2010, Jelsoft Enterprises Ltd.