problem editing cokie
Hello friends. I'm building a kind of shopping cart who tracks into a cookie the choices picked by the user along some pages. Anytime the user can go to a .php page where the choosen items are shown, prices, total, etc. I would like to add some feature to allow the user to drop some item of his list, I've been working in a form checkbox who calls onClick a function who is able to get the target value and erase it out of the cookie string. But I can't have this working because:
- I need to refresh the page automatically at the end of the function, so the changes can be shown in the browser.
- I'm not sure if I need to delete the cookie before write the new one, or if overwrite will be enough.
I will appreciate any help.