PHP transparently supports HTTP cookies. Cookies are a mechanism for
storing data in the remote browser and thus tracking or identifying return
users. You can set cookies using the setcookie() or
setrawcookie()
function. Cookies are part of the HTTP header, so
setcookie() must be called before any output is sent to
the browser. This is the same limitation that header()
has. You can use the output buffering
functions to delay the script output until you have decided whether
or not to set any cookies or send any headers.
Any cookies sent to you from the client will automatically be turned into a
PHP variable just like GET and POST
method data, depending on the register_globals
and variables_order
configuration variables. If you wish to assign multiple values to a single
cookie, just add [] to the cookie name.
In PHP 4.1.0 and later, the $_COOKIE auto-global array
will always be set with any cookies sent from the client.
$HTTP_COOKIE_VARS is also set in earlier versions of PHP
when the track_vars configuration
variable is set. (This setting is always on since PHP 4.0.3.)
features.cookies php code on this is provided for your study purpose, it will guide you to know how create and design a website using php. use it to practice and train your self online
Php features.cookies syntax tutorial
php tutorial guide and code design are for easy learning and programming. The code practice section provided at the top is for practising of this syntax. Use the code section up to practice your php programming online. Learning php is very easy, all you need is to use the examples on this site and practice them to perfect your skills.