Как создать cookie в php
// SYNTAX
//setcookie(name, value, expire, path, domain, secure, httponly);
$cookie_name = "LoginUser";
$cookie_value = "ex@gmail.com";
setcookie($cookie_name, $cookie_value, time() + (86400 * 30), "/"); // 86400 = 1 day
if(!isset($_COOKIE[$cookie_name])) {
echo "Cookie '" . $cookie_name . "' is not set!";
} else {
echo "Cookie '" . $cookie_name . "' is set!<br>";
echo "Value is: " . $_COOKIE[$cookie_name];
}
// FOR UNSET COOCKIE
unset($_COOKIE['LoginUser']);
Rht