Dr. Andrew Besmer
Set-Cookie: name=valueheader() to set HTTP headers
$_COOKIE
Set-Cookie “is a sequence of characters excluding semi-colon, comma and white space.”Set-Cookie “is a sequence of characters excluding semi-colon, comma and white space. If there is a need to place such data in the name or value, some encoding method such as URL style %XX encoding is recommended, though no encoding is defined or required.”urlencode()urldecode()base64_encode()base64_decode()Set-Cookie can be specified with a
Max-Age in seconds orExpires specified as Wdy, DD Mon YYYY HH:MM:SS GMTSet-Cookie: <cookie-name>=<cookie-value>; Max-Age=<non-zero-digit>
Max-Age directive so Expires or both are typically used in cases of needing maximum coverageMax-Age to 0 or a negative numberExpires to a previously occuring time Thu, 01 Jan 1970 00:00:01 GMTsetrawcookie($name, $value = "", int $expire = 0) easier to use
setcookie() even easier