Hi there,
I am having problems with my "how many users logged in count" most of the time when I log in to my web site with a user name and password it shows that there are 2, 3, or sometimes 7 people logged in. I know this is not correct. I have attached my code below. Can anyone suggest why?
Thanks
This is my global.asa file which is listed in my directory.
<script language="vbscript" runat="server">
Sub Session_OnStart
Session("StartTime") = Now()
Application.Lock
Application("TotalNumberOfUsers") = _
Application("TotalNumberOfUsers") + 1
Application("CurrentNumberOfUsers") = _
Application("CurrentNumberOfUsers") + 1
Application.Unlock
End Sub
Sub Session_OnEnd
Application.Lock
Application("CurrentNumberOfUsers") = _
Application("CurrentNumberOfUsers") - 1
Application.Unlock
End Sub
Sub Application_OnStart
Application("EMailAddress") = "
[email protected]"
End Sub
Sub Application_OnEnd
End Sub
Sub Application_OnStart
Application("iWroxPress") = 0
Application("iWroxConf") = 0
Application("iActivePath") = 0
Application("iBowens") = 0
Application("iHudson") = 0
End Sub
</script>
And this is my code in the page that shows after you log in, which is in my html folder.
<%=Application("CurrentNumberOfUsers")%>
Thanks.