how to use cookie in php code example
Example 1: get a cookie in php
<?php
echo 'Hello ' . htmlspecialchars($_COOKIE["name"]) . '!';
?>
Example 2: cookies php syntax
setcookie("cookie_name", "type_on_cookie", expiry_time(), "/");
<?php
echo 'Hello ' . htmlspecialchars($_COOKIE["name"]) . '!';
?>
setcookie("cookie_name", "type_on_cookie", expiry_time(), "/");