deco10
08-20-2008, 07:01 AM
Hello,
I'm working on something which does not require a login, but requires the user to agree to certain terms before they can browse past the main page. When their session expires they would have to start at the main page and click accept again.
I know there is a better way that how I am doing it, but I'll tell you how I'm doing it anyway.
the "I accept" link looks something like this:
href="mysite.asp&a=Accept"
I have a variable in global.asa that is set to true the first time the page after the "accept" page has been agreed to.
<%
if session("firstLoad") = 0 then
session("firstLoad") = 1
session("x_a") = request.querystring("a")
end if
if session("x_a") <> "Accept" then
response.redirect ("http.....")
end if
%>
This works fine the first time. However once the session ends and the user opens the "accept" page again, they always get redirected. Restarting the browser fixes this but thats not really a solution I'm happy with.
Suggestions?
Thanks.
dc
I'm working on something which does not require a login, but requires the user to agree to certain terms before they can browse past the main page. When their session expires they would have to start at the main page and click accept again.
I know there is a better way that how I am doing it, but I'll tell you how I'm doing it anyway.
the "I accept" link looks something like this:
href="mysite.asp&a=Accept"
I have a variable in global.asa that is set to true the first time the page after the "accept" page has been agreed to.
<%
if session("firstLoad") = 0 then
session("firstLoad") = 1
session("x_a") = request.querystring("a")
end if
if session("x_a") <> "Accept" then
response.redirect ("http.....")
end if
%>
This works fine the first time. However once the session ends and the user opens the "accept" page again, they always get redirected. Restarting the browser fixes this but thats not really a solution I'm happy with.
Suggestions?
Thanks.
dc