Problem Statement
What happens if a cookie’s expiration time is set to a past time?
Explanation
When a cookie is set with an expiry time in the past, the browser automatically removes it from storage, effectively deleting it.
Code Solution
SolutionRead Only
setcookie('user','',time()-3600);Practice Sets
This question appears in the following practice sets:
