How to Expire a Cookie at Midnight using PHP

One line of code:

setcookie(“CookieName”, “CookieValue”, mktime(23, 59, 59, date(“m”), date(“d”), date(“y”)));


A .NET, PHP, Marketing Guru authority, at least I hope I am. Reach me at

109 thoughts on “How to Expire a Cookie at Midnight using PHP

  1. I understand what you bring it very meaningful and useful, thanks.

  2. egregr says:

    It seems I’m on the right track, I hope I can do well. The result was something I did and was doing to implement it.

  3. html color says:

    Your article is detailed, thanks to it I solved the problem I am entangled. I will regularly follow your writers and visit this site daily.

  4. html color says:

    I regularly visit your site and find a lot of interesting information. Thank you and look forward to your page growing stronger.

  5. This is so nice. Many thanks!

  6. Thanks for the information you shared. Please share useful information with your friends regularly

  7. Great post!! very informative.
    Thank you very much for such a lovely and informative post.

Leave a Reply

Your email address will not be published. Required fields are marked *


You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>