PLEASE NOTE: I wrote this code over 10 years ago and it is clearly commented that it is NOT SECURE. More importantly, however, it's really just a demo. Don't use it for production code without thoroughly reviewing it. Specifically, it lacks secure session ID's and has not been reviewed for XSS or CSRF.
This is a good project if you're thinking about developing your own single-page PHP shopping cart and want a starting point.
PHPShopCart is an example single-script shopping-cart web application demo written in PHP and designed to connect to a MySQL database. It was written for the book, "A Guide to Databases under Linux" (Syngress Media).
This is a simple single-page shopping cart code sample, nothing more.