Cookies
|
|
|
|
<?
// By Jos� Afonso Santos aka smog
//
// smog@kaotik.org
// http://hero.kaotik.org/
// Delete a cookie.
setCookie('name');
// Set a cookie to time out in 30 days (1 month).
// Notice that the time parameter is measured in seconds.
// Set a cookie's value.
setCookie('name', 'the-name-you-want', time()+2592000);
// Create a cookie that only scripts in the
// private directory can read.
setCookie('country', 'the-country',
time()+2592000 , '/private/');
// After the cookies are set, you can access them
// using normal PHP variables.
echo "<center>Hello <b>$name</b> !</center>"; ?>
|
|
|
Usage Example
|
|
|
Rate This Script
|
|
|
|