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 durangod's Avatar
    Join Date
    Nov 2010
    Location
    southwestern USA
    Posts
    1,634
    Thanks
    314
    Thanked 34 Times in 33 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,636
    Thanks
    8
    Thanked 1,105 Times in 1,096 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
    •