Results 1 to 2 of 2

Thread: Cookies

  1. #1
    Join Date
    Dec 1969

    Default Cookies

    I&#039;ve given up on help with using sessions for a log in page so I&#039;ve turned to cookies. I found help at this link<BR><BR><BR><BR>where I&#039;m using cookies to check if a user has logged in. I have a log in page, which goes to an authorisation page and then redirects to users page. All this is working.<BR><BR>I have included a check.asp file on top of one or my users page to test, but I&#039;m getting an error.<BR><BR>Here&#039;s the code in the check.asp file<BR><BR>&#060;%<BR>if (Request.Cookies("UserName") = "")<BR>{<BR> Response.Redirect ("Login.asp");<BR> Response.End<BR>}<BR>%&#062;<BR><BR>Here is the error on the users page.<BR><BR>Microsoft JScript runtime error &#039;800a01b6&#039; <BR><BR>Object doesn&#039;t support this property or method <BR><BR>D:WWWROOTAVMAGS.COM.AULIB../include/_check.asp, line 2 <BR><BR><BR>This is line two <BR>&#060;!--#include file="../include/_check.asp"--&#062;

  2. #2
    Join Date
    Dec 1969

    Default Change your code to

    if (Request.Cookies("UserName") == ""). Dont have it as<BR><BR>if (Request.Cookies("UserName") = "")<BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts