M
Milsnips
Hi there,
i had a small project where i used a session to store the shopping cart, but
if it times out, the user loses the cart.
Then i thought instead of using session, i'll store the cart in a cookie,
but cookie only stores string values, which makes it tricky to update/remove
cart item values because i'd have to so substring, split, etc...
What i'm thinking now is to store the cart in a database table, and just add
a cookie with cartID (like a sessionID) and when the page loads, to grab the
cart details from the database and populate the page.
Any feedback appreciated to what kind of method would be best.
thanks,
Paul.
i had a small project where i used a session to store the shopping cart, but
if it times out, the user loses the cart.
Then i thought instead of using session, i'll store the cart in a cookie,
but cookie only stores string values, which makes it tricky to update/remove
cart item values because i'd have to so substring, split, etc...
What i'm thinking now is to store the cart in a database table, and just add
a cookie with cartID (like a sessionID) and when the page loads, to grab the
cart details from the database and populate the page.
Any feedback appreciated to what kind of method would be best.
thanks,
Paul.