A cookie can have one expiration. If that expiration is not set at all, the browser assumes the cookie will only last for the current session. If an expiration is set, then the browser assumes the cookie is good until it expires.
One workaround would be to use a cookie with no expiration, then provide in your PHP code the logic to invalidate that cookie after a certain period of time.
For example, in a session (which relates to a "current session" cookie on the browser) you could add a variable which states when the session was first was created. Then have your code ignore, invalidate, or remove the session variables for that session once a certain amount of time has passed.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.