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

107 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!

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>