[thelist] in-principle, PHP/mySQL shopping basket question

Hassan Schroeder hassan at webtuitive.com
Wed Jul 23 12:07:58 CDT 2003


john at johnallsopp.co.uk wrote:
> That makes the problem worse, as I was intending to write the basket to
> the database. If I do that and the session variable is cleared up, then I
> still have a database with a basket in it ... but (the penny drops) .. I
> guess you're saying I shouldn't bother with the database, just store an
> array of product ids in session variables. That makes sense.

It depends on a business decision -- do you *want* the customer to
be able to save a basket for later? If so, you'll want to make the
contents persistent and provide a way for the returning customer to
find that basket. Using a cookie is one approach, having the user
create an account is another.

-- 
Hassan Schroeder ----------------------------- hassan at webtuitive.com
Webtuitive Design ===  (+1) 408-938-0567   === http://webtuitive.com

                           dream.  code.





More information about the thelist mailing list