Update databse from global
I need to update a database table with the time the user logs out of my site/when their session ends.
I've been using a global.asa file with the following Session_OnEnd code, but it doesnt seem to be working for me........ can anybody help?
<script language=vbscript runat=server>
set conn = Server.CreateObject("ADODB.Connection")
query = "UPDATE User_LogTime SET Logout_Time = "now()" WHERE SID="&Session.SessionID&"
set conn = Nothing