setcookie("cookie_name", $ccdotvalues, time() + (3600*24*30));
echo $_COOKIE["cookie_name"];
Or you can create it by outputting Set-Cookie in the header.
When clearing:
setCookie(cookie_name); //Or change the cookie expiration date to now
Home > Article > Backend Development > Beginner: How to use cookies in PHP website development? _PHP Tutorial