stockdalep Posted March 31, 2007 Share Posted March 31, 2007 Hi I have a database and shopping cart, the items are selected by using the session_id in a cookie. So if you log out your cart stays intact. select * from cart inner join household on cart.itemName = household.itemName where cart.cookieId = '" . GetCartId() . "'"); GetCartId() runs at first to check if the cookie exists or not, if not create a new one. But when the cookie has expired it writes another one which I have checked and it is a different session_id inside so in theory the last order in the database can now not be selected because the session_id that the SELECT statement uses has changed. But it still appears in the cart. I have echoed out the GetCartId() and it is different from the database cookieId field so I have no idea how this is happening. The only way of getting rid of the last order is to delete it from the database. Thanks for any help. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.