// set the expiration date to one hour ago
setcookie("user", "", time() - 3600);
<html>
<body>
echo "Cookie 'user' is deleted.";
</body>
<!-- Mirrored from www.w3schools.com/php/phptryit.asp?filename=tryphp_func_http_setcookie4 by HTTrack Website Copier/3.x [XR&CO'2014], Mon, 27 Jan 2020 02:51:05 GMT -->
</html>