Results 1 to 2 of 2

Thread: How to Create Cookies?

  1. #1

    Thread Starter
    PowerPoster
    Join Date
    Jan 2001
    Location
    Florida
    Posts
    3,216

    Talking

    Hello all. I am new to writing cookies. I have a website and my user registration and log in page work fine. I can limit their session on the site by using a session variable but I now want to use cookies to recognize my registered users and populate various fields automatically so that my site becomes more functional.

    Who can help and show mw code?

    thanks!

  2. #2
    Hyperactive Member Kagey's Avatar
    Join Date
    Sep 2000
    Location
    The Wilderness of New Brunswick
    Posts
    294
    Placing Cookies
    <%
    Response.Cookies("name").Expires = Date + 7
    'Response.Cookies("name").Expires = #January 01, 1999#
    'Response.Cookies("name").Secure = True
    Response.Cookies("name").Path = "/path"
    Response.Cookies("name").Domain = "www.domain.com"
    Response.Cookies("name") = "Kagey One"
    'Response.Cookies("name")("first") = "Kagey"
    'Response.Cookies("name")("last") = "One"
    %>

    Reading Cookies
    <%
    Response.write request.Cookies("name")
    %>

Posting Permissions

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



Click Here to Expand Forum to Full Width