Then we will look at the "shopping cart" itself. This exercise will only use one database table -- which will store the products which are on sale. The "shopping cart" will only last for the life of the session.
For practice, we will do the whole exercise of setting up a database, allocating user names and passwords - all from phpMyAdmin on a Blue Host Account. We will then set up a Catalogue table on the database. To "consolidate" on what we have already learnt(??) we will create the table and populate it from phpMyAdmin, and from a PHP program. We will start with the data on an Excel Spreadsheet, and move it from there into our Database Table
To get the shopping cart data in, we are going to need a form -- so we will have to set one up to take the customer's order. And unless we want to look very "el cheapo", we will do some formatting of the form -- and to the display of the contents of the cart.
This exercise is drawn from / inspired by (plagiarised from?) one of the ones in Vikram Vaswani's How to Do Everything With PHP & MySQL pp. 133-145 of the 2005 edition. [Vikram's site is www.melonfire.com]
This exercise will cover: