+
-
Cookie: NAME1=OPAQUE_STRING1; NAME2=OPAQUE_STRING2 ...
Set-Cookie: NAME=VALUE; expires=DATE; path=PATH; domain=DOMAIN_NAME; secure
setcookie(name, value, expire,
path, domain, secure)$_COOKIE[] and $_REQUEST[]
superglobalssetcookie() must be called before any output is
generatedexpire measured in seconds since the
epoch (e.g., time()+60*60*24*30 for 30 days)expire == 0, cookie expires when
browser is closedname uses "array notation",
$_COOKIE[] will process as arrayWrite two PHP functions: one that returns your name and another that prints your name.
© 2007 Calvin College and Jeremy D.
Frens.
This work is licensed under a Creative
Commons Attribution-Noncommercial-Share Alike 3.0 United States
License.