Cookie handling - web page acceptance

Snitz™ Forums 2000
https://forum.snitz.com/forumTopic/Posts/67542?pagenum=1
05 November 2025, 03:13

Topic


Lon2
Cookie handling - web page acceptance
30 July 2008, 14:49


In an ASP page, I want to create an acceptance cookie handler. I want to have a script write a cookie after a visitor clicks "agree" then is directed to a certain page. Similar to Snitz login but without logging in. So if the user has the cookie, they can go to a certain page, but if they don't (didn't agree), they don't have access to the page.<

 

Replies ...


gary b
03 August 2008, 15:45


Lon2

Sounds like what you want is a login process... such a process will create a cookie or a session variable. I prefer session variables because, when the User logs out or is inactive for - say - ten minutes, permission is withdrawn.
As with any login process you have access to pages/resources if you login or accept terms. No login or acceptance means access to those resources/pages is denied because the cookie/session variable is not created. Snitz works along these lines by assigning a value to a variable. Each page you want to 'protect' starts by checking for the cookie, session variable, or value of a variable. If the page request fails that test, access to page is refused.
There are many examples of ASP login processes... you could try Google for ASP login. I found a very good one that way.
HTH

Edit: I have NOT tried this, but I think this might be similar to what you seek:
http://www.toddwoolums.com/asplogin.asp<
© 2000-2021 Snitz™ Communications