Guest_imported
New member
- Jan 1, 1970
- 0
A well-known site advertised the following code:
<%
Sub Session_OnStart
Application.Lock
Application("Sessions" = Application("Sessions"+1
Application.UnLock
End Sub
Sub Session_OnEnd
Application.Lock
Application("Sessions" = Application("Sessions"-1
If Application("Sessions" < 0 Then Application("Sessions"=0
Application.UnLock
End Sub
%>
This code is to be placed in the global.asa file and is meant to show the number of users on the site when the following code is placed on a web page;
<%= "Number of users on-line: " & Application("Sessions"%>
I've tried the above code unsuccessfully. I'd really like to use this counter for a site - could anyone tell me what could be wrong?
Cheers
<%
Sub Session_OnStart
Application.Lock
Application("Sessions" = Application("Sessions"+1
Application.UnLock
End Sub
Sub Session_OnEnd
Application.Lock
Application("Sessions" = Application("Sessions"-1
If Application("Sessions" < 0 Then Application("Sessions"=0
Application.UnLock
End Sub
%>
This code is to be placed in the global.asa file and is meant to show the number of users on the site when the following code is placed on a web page;
<%= "Number of users on-line: " & Application("Sessions"%>
I've tried the above code unsuccessfully. I'd really like to use this counter for a site - could anyone tell me what could be wrong?
Cheers