SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Wizard
    Join Date
    Mar 2004
    Posts
    1,647
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    cookie time stamp

    hi!
    can someone explain me how to set for example current date to a cookie and then when pass a month this coockie is deleted....
    any suggestion apreciated....
    thanx in advance!!!

  2. #2
    SitePoint Evangelist TRISPECTIVE's Avatar
    Join Date
    Sep 2002
    Location
    n/a
    Posts
    477
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    When you set the cookie with setcookie(), use the third parameter to decide when you wish the cookie to expire. It is unix time value so it is easy to calculate it: time() + 2678400.

    http://ro.php.net/manual/en/function.setcookie.php


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
  •