Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    Senior Coder
    Join Date
    Nov 2010
    Posts
    1,486
    Thanks
    279
    Thanked 32 Times in 31 Posts

    set cookie 5 hours

    Hi, i need to set a cookie to expire in 5 hours. I normally use an hour at +3600 but i have never done 5 hours before so will this work or should i use a different value.


    PHP Code:
    setcookie("Sitecheck"$valuetime()+18000); 

  • #2
    Master Coder
    Join Date
    Jun 2003
    Location
    Cottage Grove, Minnesota
    Posts
    9,546
    Thanks
    8
    Thanked 1,093 Times in 1,084 Posts
    That's exactly correct.

    It will be based off of your server timezone, not the user's timezone.

    If that's important, you can force the timezone to be whatever you wish.



    .

  • Users who have thanked mlseim for this post:

    durangod (08-27-2011)


  •  

    Posting Permissions

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