I've done custom php sites before but this is the first eCommerce site. I have a MySQL database with a table that matches sessionID to cartID and then a table that has cartID, sku, and quantity.
When someone leaves the site and a session ends obviously the session id along with the cart info is still in the database. the only thing I can think to remedy this is in the header file query the session id's and match it to the current running session ID's and delete anything that's not there. Does anyone have a better way to do this?