This PHP script first attempts to set a cookie called "id" with an empty value that will expire in 1 hour, then overwrites it by setting the same cookie to expire 1 hour ago, so the cookie will be deleted. It then echoes the value of the "id" cookie, which will be empty since it has expired.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
35 views1 page
Cookie
This PHP script first attempts to set a cookie called "id" with an empty value that will expire in 1 hour, then overwrites it by setting the same cookie to expire 1 hour ago, so the cookie will be deleted. It then echoes the value of the "id" cookie, which will be empty since it has expired.