Does somebody knows (or point me to a script) how to show the number of users online (online: the number of users accesing your application in a point of time)
You could modify the users' info table, and add two more fields, "active" and "lastlogin"
I like to use lastlogin for my admin site, to see who logged in recently.
WHen a user logs in, ( if password matches suers' password in the DB ) then update that users' record with
--->set active=1 , lastlogin='"&now()&"' where UID=1
I figure Active can be a bit flag, True / False and LastLogin can be a datetime.
Now when you want to show active users, do a select of members table where active=0 or true. From that you can extract the details and show them if you want.
japes
_______________________________________________
OutsideIntranets.com
Stop wasting time, get to work
You can use the Application level variables to do this stuff.
Correctly pointed in one of the posts, use the Global.asa to declare Application level variables. And also check for more info on Application.Lock, Application.Unlock, using which you can lock and unlock the application variables, before incrimenting or decriminting the value, based on Session on Start and session on End.
Say a person logs on, now you have a new session starting, so you inc the Application level variable by one (before doing that you lock it, and after inc unlock it). Now in the Session on End repeat the same routine and also dec the value of the Application variable.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.