I'm working on a OOP shopping cart system from scratch for my company.
Based on the following criteria.. speed, security, functionality, overall
Do you think its better to store the product information as an array in the session variable or is it better to store the shopping cart in the database where each product has its own row with a crypted session ID as the user's key?
Any know the pros and cons of each?
I could think off the top of my head that the array system might be faster and be able to handle more users because you're not doing database queries everytime you mess with the cart, but then what about security and functionality?
Pros and Cons for Shopping Cart System??
Moderator: General Moderators
I too would suggest the database, as long as your estimated server load can handle it. Of course if you're already using the database for other operations on the site there is very little overhead so it just makes sense...
BTW, I've been gone for a while, trying to finish my darn thesis, but I found a nice article on security/cookies if you're interested at:
http://pdos.lcs.mit.edu/cookies/pubs/webauth:tr.pdf
BTW, I've been gone for a while, trying to finish my darn thesis, but I found a nice article on security/cookies if you're interested at:
http://pdos.lcs.mit.edu/cookies/pubs/webauth:tr.pdf