This question was posted in uk.net.web.authoring:
I’ve got a site on the way, where I need to add products to a sort of simple shopping basket. The plan is to add a pair of values (UserID, ProductID) to a MySQL database for every product the user adds to the basket, and then get rid of them when the user checks out. Problem is if the user doesn’t chek out, then the cookie can expire and leave me with a load of useless records in my database. Any suggestions?
I think the question is making a false assumption. Here’s my answer: