Forums
This topic is locked
show names of users online
Posted 29 Mar 2004 21:41:47
1
has voted
29 Mar 2004 21:41:47 Dave Clarke posted:
hiI have code in my global.asa that counts the number of current users but now what I'm hoping to do is show which users are online using either their username (if they are members) or Guest if they are not.
I think i have a basic grasp of what i'm trying to do and could probably do it for one user
<b>Sub Session_OnStart
If Session("MM_Username"



Else Session("onlinenow"

End If
End Sub</b>
would this work for one user? if so how would i expand it to cater for all users that are online.
I assume that i would have to dimension an array but how could i do this without knowing how many users are going to be online?
Am i on the right track or barking up the wrong tree altogether?
Dave
ASP|VBScript|IIS5.1|Access|WinXPPro & WinXPHome
Replies
30 Mar 2004 18:14:47 replied:
Try using repeat region with the sessions variable.
Replied 31 Mar 2004 14:00:14
31 Mar 2004 14:00:14 Phil Shevlin replied:
Replied 01 Apr 2004 08:00:27
01 Apr 2004 08:00:27 Dave Clarke replied:
Thanks wdglide
I'll study that later.
Dave
ASP|VBScript|IIS5.1|Access|WinXPPro & WinXPHome
I'll study that later.
Dave
ASP|VBScript|IIS5.1|Access|WinXPPro & WinXPHome
Replied 01 Apr 2004 16:41:30
01 Apr 2004 16:41:30 Vince Baker replied:
How about building a comma seperated string to hold that info and then breaking it into an array when you actually display them?
i.e.
If session("mm_username"
<> "" then session ("onlinenow"
= session("onlinenow"
& "," & session("mm_username"
This way you will have a string you can break into an array.
Regards
Vince
Visit my home: www.chez-vince.com
VBScript | ASP | HTML | SQL | Oracle | Hosting
i.e.
If session("mm_username"




This way you will have a string you can break into an array.
Regards
Vince
Visit my home: www.chez-vince.com
VBScript | ASP | HTML | SQL | Oracle | Hosting