list of online users and there email
Hey ExpertsI found an old example of a mini chat that I have removed the \"online users\" application from and inserted it into a login system I have
when a person logs in i create three sessions
name, email and password
at the same time it creates a list of logged online users by using the session name
My problem is this
I have been trying to create a new list that will show that persons email aswell but I only get server errors :(
Any ideas ? heres my script
page1 <--- creates the list of users when logging in
<%
Dim users
If Application(\"NumUsers\") = 0 Then
ReDim temp1(50)
ReDim temp2(50)
Application(\"users\") = temp1
End If
users = Application(\"users\")
Dim i
For i = 1 To 1000
If users(i) = \"\" Then
users(i) = Session(\"name\")
Application.Lock
Application(\"NumUsers\") = Application(\"NumUsers\") + 1
Application.Unlock
Exit For
End If
Next
Application.Lock
Application(\"users\") = users
Application.Unlock
Response.Redirect \"users.asp\"
%>
Page 2 <--- show the list of onlineuser
(but with for there emails as well)
<%
Dim Userlist, Datelist, i, num, users, refresh
\' Retrieve application arrays
users = Application(\"users\")
refresh = Application(\"refresh\")
For i = 1 To 50
If users(i) = Session(\"name\") Then
refresh(i) = Time
Exit For
End If
Next
Application.Lock
Application(\"users\") = users
Application(\"refresh\") = refresh
Application.Unlock
%>
<h3>People Online: <%=Application(\"NumUsers\")%></h3>
<%
For i = 1 To 50
If users(i)<> \"\" Then
Response.Write \"<a href=user_show_user.asp?user=\" & users(i) & \">\" & users(i) & \"</a><br>\"
End If
Next
%>
So if anyone has a good idea or advice of how I would add there email as well it would be great :)
Guzzie
