Use the function Setcookie()
Example to set a cookie:
setcookie ("TestCookie", $value,time()+3600);
Test cookie is the name, value the value and time() the expiry date in seconds (in this case 1 hour)
to delete make time negative (in the past)
to get the value of the cookie, it will be stored in a variable from the start of the script.
In this case, if you set:
setcookie ("Login", $email,time()+3600);
Then:
$_COOKIE["Login"] = $email
You can also add a security feature. I use a random number and add that to the cookie and the database. (the number is created on registration) and the number must match that in the database to be logged in. I set my value to $id:$random (random number) and use explode on it.
Also, phpinfo() will give you the cookies that are set by your site in your computer. It will also give their names - such as _COOKIE["Login"] and its value.
For example: get a script with is just this:
<?
setcookie ("Login", "email",time()+3600);
echo $_COOKIE["Login"];
// should echo "email"
?>
php.net manual: http://www.php.net/manual/en/function.setcookie.php
ALSO setcookie() must be executed before any information is sent to the user - any html, any echo, any html (or blank lines) before the php tags <?
$_COOKIE can be accessed at any point in the script, as its a variable.
However.
You should also look at sessions and see if they do what you want as well. Especially as then people without cookies cannot view your site then. Sessions should be applied to all - in cookie form first, then if cookies wont write for the sessions, use the url version. I dont know much about it, so look it up or ask.