PHP Source:
<!DOCTYPE html>
<?php
$cookie_name = "user";
unset($_COOKIE[$cookie_name]);
// empty value and expiration one hour before
$res = setrawcookie($cookie_name, '', time() - 3600);
?>

<html>
<body>

<?php
echo "Cookie 'user' is deleted.";
?>


</body>
</html>
Result:
Show PHP - © w3schools.com
Privacy Policy