|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
SlickEdit: Code in over 40 languages across 7 platforms. SlickEdit’s unmatched power, speed, and flexibility allows even the most accomplished developers to write better code faster. Download a free trial today! |
|
#1
|
|||
|
|||
|
Cookie Validation
<i><b>Originally posted by : Mark Smith (ca8msm@isis.sund.ac.uk)</b></i><br />I have a page in which users log into my website. If the login is successful, then a cookie named loginok is sent to them. I need all the other pages on the website to check for this cookie's existence before allowing users access to any pages. I have tried the code below at the top of each of my pages but have had no success. I basically check to see if loginok is smaller or greater than "" but this doesnt seem to work. Is there a way of just checking to see if the cookie exists? Can someone please help? <br /><br /><% <br />If Request.Cookies("loginok")<>"" Then <br />Do Nothing <br />else <br />Response.Redirect("accessdenied.html") <br />end if <br />%> <br /><br />Thanks <br />Mark
|
|
#2
|
|||
|
|||
|
<i><b>Originally posted by : </b></i><br /><br /><br /><br />------------<br />Mark Smith at 4/7/2001 6:24:46 PM<br /><br />I have a page in which users log into my website. If the login is successful, then a cookie named loginok is sent to them. I need all the other pages on the website to check for this cookie's existence before allowing users access to any pages. I have tried the code below at the top of each of my pages but have had no success. I basically check to see if loginok is smaller or greater than "" but this doesnt seem to work. Is there a way of just checking to see if the cookie exists? Can someone please help? <br /><br /><% <br />If Request.Cookies("loginok")<>"" Then <br />Do Nothing <br />else <br />Response.Redirect("accessdenied.html") <br />end if <br />%> <br /><br />Thanks <br />Mark
|
|
#3
|
|||
|
|||
|
<i><b>Originally posted by : </b></i><br /><br /><br /><br />------------<br /> at 4/10/2001 5:58:11 AM<br /><br /><br /><br /><br />------------<br />Mark Smith at 4/7/2001 6:24:46 PM<br /><br />I have a page in which users log into my website. If the login is successful, then a cookie named loginok is sent to them. I need all the other pages on the website to check for this cookie's existence before allowing users access to any pages. I have tried the code below at the top of each of my pages but have had no success. I basically check to see if loginok is smaller or greater than "" but this doesnt seem to work. Is there a way of just checking to see if the cookie exists? Can someone please help? <br /><br /><% <br />If Request.Cookies("loginok")<>"" Then <br />Do Nothing <br />else <br />Response.Redirect("accessdenied.html") <br />end if <br />%> <br /><br />Thanks <br />Mark
|
![]() |
| Viewing: ASP Free Forums > Programming > .NET Development > Cookie Validation |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|
|
|