cookies for virtual store [RESOLVED]
in every attempt to explain what is a cookie, people give the example of a virtual store,
well I happen to write a virtual store script and I am in the part of letting the customer to buy more then one item.
I need to use cookies to store all the data.
I have this database that contain all the items for sale, and I have the page that shows them.
I need to add near every item a small shopping cart that when the user clicks on it its storing the item name, and item price in the cookie.
the problem is I dont know how to do that when the customer clicks on a cart and then on another cart it will not erase the last data that was in the cookie.
in other word I dont understand how to use the cookies to store this data.
anybody can help me by pointing the direction of how to do it?
Yair