Create a MySQL database that models the inventory of a store. Create a web page for that store that allows to search products (you must be able to search for a specific item name and display that item, or search and display all items in a certain category), display products, add products to a shopping cart and "buy" various quantities of products. To "buy" a product means to reduce the quantity from that product with the quantity that was "bought" (ie your database should be updated to reflect the reduction in quantity of items after purchase). The shopping cart can be viewed, edited, checked out or deleted.
All the products from the store have to belong to one or more categories (Ex: groceries, health and beauty, etc). Populate your database with at least 3 categories and at least 7 products per category.
You are responsible for designing the tables (must have at least 2 tables).
Php will be used for all the server side scripting (no asp,jsp etc). The cart will be implemented with $_SESSION variables.
The web page does not have to look professional. The most important aspect of your homework is: IT HAS TO WORK. Check user input: do not allow me to buy -2 boxes of detergent or, 100 boxes if you only have 2 in stock.
HINT: spend time looking at the basic php slides. There are notes on the use of $_SESSION and $_POST, both of whom are treated like arrays with keys and associated values. You will want to store your cart info in $_SESSION and use $_POST to keep track of which actions have just occurred (eg add item, update cart, delete cart, remove item etc).
Submission:
Friendly advice : it will take some time to implement this homework, so start early. Also, remember that the programming assignment is individual. The academic integrity policy will be strictly enforced.