<?php
//setcookie() defines a cookie to be sent along with the rest of the HTTP headers. 
//Once the cookies have been set, they can be accessed on the next page load

$cookie_name = 'ceiduser';
$cookie_value = 'Koutsomi';
setcookie($cookie_name, $cookie_value, time() +  (5));//(86400)); = 1 day 

if(isset($_COOKIE['ceiduser']))
{
	echo "Cookie OK! :-) - Cookie Value: ".$_COOKIE['ceiduser'];
}
else
	echo "Cookie burned! :-(";

/*
Like other headers, cookies must be sent before any output 
from your script (this is a protocol restriction). 
This requires that you place calls to stecookie() function prior 
to any output, including <html> and <head> tags 
as well as any whitespace.
Once the cookies have been set, they can be accessed 
on the next page load with the $_COOKIE array.

When the cookie expires When a cookie expires in PHP, 
it means that the information stored in that cookie is no longer 
valid or accessible after the specified expiration time has passed.

The isset() function in PHP is used to determine whether 
a variable is set or not. 
*/
?>