Syntax:
To destroy a cookie, you need to set its expiration time to a past date.
Example:
// Deleting a cookie by setting its expiration time to a past date
setcookie("user", "", time() - 3600, "/");
Syntax:
To destroy a cookie, you need to set its expiration time to a past date.
Example:
// Deleting a cookie by setting its expiration time to a past date
setcookie("user", "", time() - 3600, "/");