Answer the question
In order to leave comments, you need to log in
Why can't cookies be deleted or updated?
Hello! There was such situation: there is a basket which is stored in cookie. When adding a product to the cart, the data is sent to the handler, the product parameters are passed to the function as an array key and the quantity of the product as a value. In the cart there is also the ability to change the quantity of goods, then the data is already transferred to another handler, but they call the same function for adding goods already with a new quantity and the same key extracted from the cookie is passed, but the problem is that the cookies are not updated from this handler. If you simply add the same product with a new quantity, then the data is updated successfully, but the same mechanism in another handler does not work for some reason. I tried to display the array immediately after calling the print_r($_COOKIE[key]) function, checked through the firebug console - the array was displayed with a new value, but as soon as the page is refreshed, the old value is returned. I tried to delete - they are not deleted, while it does not give errors. Please help me figure it out! Thanks in advance!
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question