Cookie Probs

Results 1 to 2 of 2

Thread: Cookie Probs

  1. #1
    Join Date
    Dec 1969

    Default Cookie Probs

    I am having a problem setting my cookies. It seems my cookie is not setting properly. I check the cookies directory and it si set but not being read for some reason. It sets and is read after I pass it to the next page. But next time I come to a page that checks for the cookie to redirect it to a page, the cookie is not read as if it was never created. The expiration date is set correctly too. Here is the code I use to set it. It sends it to the cookie_reader site afterwards which reads the cookie fine. But next time I go there it does not read the cookie: <BR><BR>cookie baker <BR>&#060;% <BR>Response.buffer = True <BR>Site = Request.Form("site") <BR>Response.Cookies("Name")= Site <BR>Response.Cookies("Name").Expires= Date + 365 <BR><BR>Response.Redirect("cookie_reader.asp") <BR>%&#062; <BR><BR>cookie reader <BR>&#060;% <BR>if Request.Cookies("Name") = "page1" then <BR> Response.Redirect("default2.asp") <BR>elseif Request.Cookies("Name") = "page2" then <BR> Response.Redirect("default1.asp") <BR>else <BR> Response.Redirect("") <BR>end if <BR>%&#062;

  2. #2
    Join Date
    Dec 1969

    Default RE: Cookie Probs

    the code looks ok, but response.write out the values before you redirect to see if they are passed at all.<BR><BR>in this example, I think querystring would be a better idea, as it wouldn&#039;t matter if the browser had the cookies turned off or not.

Posting Permissions

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