manual/en/features.cookies.php
20150809_rev01 · COMPARED WITH 20150703_rev01 · ARCHIVE SNAPSHOT, DATE APPROXIMATE
Full text changes — 20150703_rev01 to 20150809_rev01
| 7 | 7 | For more details, including notes on browser bugs, see the [setcookie()](http://php.net/manual/en/function.setcookie.php) and [setrawcookie()](http://php.net/manual/en/function.setrawcookie.php) function. |
| 8 | 8 | |
| 9 | 9 | 26 |
| 10 | 10 | |
| 11 | 11 | [**_Tugrul_**](http://php.net/manual/en/features.cookies.php) [¶](http://php.net/manual/en/features.cookies.php) |
| 12 | 12 | |
| 13 | **3 months ago** | |
| 13 | **5 months ago** | |
| 14 | 14 | |
| 15 | 15 | `Setting new cookie ============================= <?php setcookie("name","value",time()+$int); /*name is your cookie's name value is cookie's value $int is time of cookie expires*/ ?> Getting Cookie ============================= <?php echo $_COOKIE["your cookie name"]; ?> Updating Cookie ============================= <?php setcookie("color","red"); echo $_COOKIE["color"]; /*color is red*/ /* your codes and functions*/ setcookie("color","blue"); echo $_COOKIE["color"]; /*new color is blue*/ ?> Deleting Cookie ============================== <?php unset($_COOKIE["yourcookie"]); /*Or*/ setcookie("yourcookie","yourvalue",time()-1); /*it expired so it's deleted*/ ?> Reference: [http://gencbilgin.net/php-cookie-kullanimi.html](http://gencbilgin.net/php-cookie-kullanimi.html)` |
| 16 | 16 | |
| 17 | 17 | \-4 |
| 18 | 18 | |
| 19 | 19 | [**_ingen at stocken.ws_**](http://php.net/manual/en/features.cookies.php) [¶](http://php.net/manual/en/features.cookies.php) |