Here's the deal. I have a web site using ASP, where when a member logs in and i verify him i want to use the Session.SessionID to reference the record in the database that controls his access. Inserting the Session.SessionID value into the DB is easy, and referenceing it to check his access was easy as well. The problem is on the logout screen.
I have a button on the top of my page that runs the following VBScript
<script language=vbscript>
sub btn1_onclick
document.location="logout.asp"
end sub
</script>
The logout.asp file only has three steps.
<%
Session.abandon
SQL="update table set ID = null where ID=<%session.sessionID&>;"
myconn.execute(SQL)
response.redirect "../default.asp"
%>
This way is should tell the server to kill the session, to remove it from the DB table that stores it, and then redirect out to the main page. Now becuase the Session object isn't actually killed until all the other script on the page finishes, this should all work.
But here's the problem. When I response.write the session.sesionid on the defualt.asp page that was just loaded, it still shows the same Session.sessionid that I had in the database. Shouldn't it have killed that session, and started a new one?
Is there something here that i am missing?
Thanks in advance
I have a button on the top of my page that runs the following VBScript
<script language=vbscript>
sub btn1_onclick
document.location="logout.asp"
end sub
</script>
The logout.asp file only has three steps.
<%
Session.abandon
SQL="update table set ID = null where ID=<%session.sessionID&>;"
myconn.execute(SQL)
response.redirect "../default.asp"
%>
This way is should tell the server to kill the session, to remove it from the DB table that stores it, and then redirect out to the main page. Now becuase the Session object isn't actually killed until all the other script on the page finishes, this should all work.
But here's the problem. When I response.write the session.sesionid on the defualt.asp page that was just loaded, it still shows the same Session.sessionid that I had in the database. Shouldn't it have killed that session, and started a new one?
Is there something here that i am missing?
Thanks in advance