Although Sessions are a good way of doing this, why not discuss how to use cookies anyway...
<?php
//This sets the cookie called TestCookie to a variable $value
setcookie("TestCookie", $value);
//This sets a variable to the value of TestCookie. This can be used on any page in the domain.
$testcookie = $_COOKIE["TestCookie"];
//This will show you all of your cookies that are set for your domain
var_dump($_COOKIE);
?>
Hope this helps.