manual/en/features.cookies.php
20061014_rev01 · COMPARED WITH 20060409_rev01 · ARCHIVE SNAPSHOT, DATE APPROXIMATE
Full text changes — 20060409_rev01 to 20061014_rev01
| 1 | - [HTTP authentication with PHP](http://www.php.net/manual/en/features.http-auth.php) | |
| 2 | - [Cookies](http://www.php.net/manual/en/features.cookies.php) | |
| 3 | - [Sessions](http://www.php.net/manual/en/features.sessions.php) | |
| 4 | - [Dealing with XForms](http://www.php.net/manual/en/features.xforms.php) | |
| 5 | - [Handling file uploads](http://www.php.net/manual/en/features.file-upload.php) | |
| 6 | - [Using remote files](http://www.php.net/manual/en/features.remote-files.php) | |
| 7 | - [Connection handling](http://www.php.net/manual/en/features.connection-handling.php) | |
| 8 | - [Persistent Database Connections](http://www.php.net/manual/en/features.persistent-connections.php) | |
| 9 | - [Safe Mode](http://www.php.net/manual/en/features.safe-mode.php) | |
| 10 | - [Using PHP from the command line](http://www.php.net/manual/en/features.commandline.php) | |
| 11 | ||
| 1 | 12 | ## Chapter 35. Cookies |
| 2 | 13 | |
| 3 | 14 | 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()**](http://www.php.net/manual/en/function.setcookie.php) or [**setrawcookie()**](http://www.php.net/manual/en/function.setrawcookie.php) function. Cookies are part of the HTTP header, so [**setcookie()**](http://www.php.net/manual/en/function.setcookie.php) must be called before any output is sent to the browser. This is the same limitation that [**header()**](http://www.php.net/manual/en/function.header.php) has. You can use the [output buffering functions](http://www.php.net/manual/en/ref.outcontrol.php) to delay the script output until you have decided whether or not to set any cookies or send any headers. |
| 4 | 15 | |
| 5 | 16 | Any cookies sent to you from the client will automatically be included into a [$\_COOKIE](http://www.php.net/manual/en/reserved.variables.php) auto-global array if [variables\_order](http://www.php.net/manual/en/ini.core.php) contains "C". If you wish to assign multiple values to a single cookie, just add \[\] to the cookie name. |
| 6 | 17 |