A shopping cart using php is a good place to learn how php works. I had promised to improve our simple shopping cart by adding some functionality to it. Today therefore, I have added a drop-down list to our web store so that customers can select an option describing where they found our store. It could be through television ads, phone directory, word of mouth or other sources. So, without much ado, am going to show you how our page will look like then share the php and html code.
A shopping cart in php will be a good example for learning. When I started using PHP, I began like most other people; the basics. I then promised to show you how to create a simple shopping cart. I have to warn you beforehand, this is not really a complex version. I figured it is smart to start with a simpler version then add more functionality to it as we proceed. So, let us get to it. I am going to do this in reverse, that is, show you snapshots of the cart then dissect the code. So, here we go!