PHP Cookies
Submission Date: 2005-08-15
Website: www.axion-network.net
Email:
Keywords: PHP, cookies, set cookies, modify cookies, retrieve cookies, PHP tutorial, authentication tutorial
Synopsis: Learn how to set/retrieve/modify cookies through php. PHP Cookies
Cookies are very easy in php...
The simplest way to set a cookie is:
to delete a cookie, use:
To get the value of a cookie, PHP will automatically give you all of the cookies for your url automatically, eg. The cookie set above will be given to your script simply by looking at the value of $CookieName
Of course, there are more options... To set an expiration date of a cookie, use:
This will set this cookie to expire in 1 hour (3600 seconds) from now (time()).
Still, there are even more things you can do, but they are not commonly used, so i will not cover them here...
Visit the links below for more information...
Functions references for this tutorial:
setcookie(...),
time(...)
Link to this article:
http://www.daremedy.com/tutorials/php/tut-1124119259.html
