How can you delete a cookie in PHP?
- setcookie() with expiry 0
- delete_cookie()
- remove_cookie()
- destroy_cookie()
To delete a cookie in PHP, you can use the setcookie() function with an expiration time in the past or set it to zero. This will invalidate the cookie and remove it from the user's browser. For more details, check: http://php.net/manual/en/function.setcookie.php
Loading...
Related Quiz
- You can access the cookie's information in PHP using the $_COOKIE ______ array.
- The PHP files should be saved with a ______ extension for the server to parse them.
- You have an array in your PHP script and you need to sort it in ascending order. How would you do this?
- Is it possible to extend the execution time of a PHP script?
- What are some key components of a class in PHP?