January 28, 200917 yr <--- this is PHP / MySQL btw ---> A user in an e-commerce site adds an item or two into their shopping cart/basket and then navigates elsewhere in the site. After going elsewhere they return to the cart to find the items still there. What is the storage of this data tied to? The database or a session?
January 28, 200917 yr Personally, I only use cookies to keep somebody logged in to a website if they choose to. For everything else, I use sessions.
January 28, 200917 yr Author Cheers for the feedback. I'll post back with anything fairly interesting I find for anyone else viewing this topic.
January 29, 200917 yr It depends on what you need really. Sessions are the obvious choice but if you wanted to keep the items in the cart so that if a user closes their browser and returns a day later with their items still in the cart, cookies would be better.
Create an account or sign in to comment