> This defines the name of the cookie, its value, the path to which this cookie is embedded, and many more arguments.
> This function therefore creates the cookie.
> It also defines the time for which the cookie should exist, after this time it will be destroyed.
> Example below shows how to create a cookie and later destroy it.
Example - How to create Cookie
// creating the cookie user with value Brian Henry
setcookie("user","Brian Henry",time() + ( 86400 * 30 ), "/");
echo "Cookie user is set with value".$_COOKIE["user"];
setcookie("user","",time() - 3600); //setting the expiry of the cookie in 1 hour.