Answer the question
In order to leave comments, you need to log in
How to clear cookies from a user?
Good day!
Brief background: the other day hosting went down, and the hoster transferred the account with the site (an online store on ModX with the shopkeeper module) to another server. And as a result of this, a personal discount when placing an order, which is somehow tied to cookies, has ceased to be considered. And until these same cookies were cleared in the browser, the discount was not considered.
Hence the question: how can I clear site cookies for a user, or overwrite them with updated values? Directly, as I understand it, they can not be removed.
Answer the question
In order to leave comments, you need to log in
Example #2 Example of deleting a cookie with setcookie()php.net/manual/en/function.setcookie.php
To delete a cookie, it is enough to specify some time in the past as the expiration date. This will start the browser mechanism to remove expired cookies.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question