Deleting cookies using the setcookie function in PHP:
The setcookie() function can actually accept up to six arguments, but only one argument is actually required — and that is the cookie name. If you use the setcookie function, and just pass a cookie name without a value, then it will have the same effect as deleting the existing cookie with the same exact name. For example, to create a cookie called first_name, you use this line:
setcookie('first_name', 'vrije');
And to delete the first_name cookie, you would do this:
Example of deleting a cookie in PHP:
setcookie('first_name');