Results 1 to 5 of 5

Thread: cookie remembering language choice

  1. #1
    Join Date
    Jul 2006
    Location
    Antwerp, Belgium (Europe)
    Posts
    927
    Thanks
    121
    Thanked 2 Times in 2 Posts

    Default cookie remembering language choice

    Hey,
    On lots of sites, at your first visit, you have to chose your language. That information is stored in/by a cookie, so the next time you visit that site, you are immediately forwarded to the language you choose.

    How does such a cookie look like ?

  2. #2
    Join Date
    Jul 2006
    Location
    Antwerp, Belgium (Europe)
    Posts
    927
    Thanks
    121
    Thanked 2 Times in 2 Posts

  3. #3
    Join Date
    Jul 2006
    Location
    Antwerp, Belgium (Europe)
    Posts
    927
    Thanks
    121
    Thanked 2 Times in 2 Posts

  4. #4
    Join Date
    Jul 2006
    Location
    Antwerp, Belgium (Europe)
    Posts
    927
    Thanks
    121
    Thanked 2 Times in 2 Posts

  5. #5
    Join Date
    Jul 2006
    Location
    Canada
    Posts
    2,581
    Thanks
    13
    Thanked 28 Times in 28 Posts

    Default

    Hmm.. I must've posted while this was being moved. I said something along the lines of:

    PHP is probably the easiest way to do this:

    to set a cookie
    Code:
    setcookie(cookiename,content,time()+3600);
    to retrieve cookie data
    Code:
    $myvar = $_COOKIE[cookiename];
    - Mike

Bookmarks

Posting Permissions

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