Questions about this topic? Sign up to ask in the talk tab.

Cookies/Accessing A Cookie/PHP

From NetSec
Revision as of 06:32, 19 July 2012 by Chantal21I (Talk | contribs) (Created page with "Use the $_COOKIE superglobal to read the cookies. Remember it can't be used to set or delete cookies, only to read them, though PHP won't shout at you if you try and set some val...")

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Use the $_COOKIE superglobal to read the cookies. Remember it can't be used to set or delete cookies, only to read them, though PHP won't shout at you if you try and set some values. Just, it won't give a damn and never set them client-side.

<syntaxhighlight lang="php"> $lover = $_COOKIE['my_lover']; </syntaxhighlight>