I'm trying to develop an order form that will list several products with a corresponding "Quantity Desired" text box next to each item and that will have a "Place Order" submit button at the bottom of the form. The idea is the customer will enter a quantity for each of the products desired and then place the order with one click.
So far, I've been able to populate my order form with products by using a "SELECT" statement from my products table and a "mysql_fetch-array" query with a "while loop". No problem so far.
Assuming the customer orders several items by entering several numbers in the "Quantity Desired" column and then by clicking on the "Place Order" button, an array should be generated (I hope) with the variables of: product id, description, price and quantity desired.
What I want to do next is to INSERT this array into a "order_details" table, calculate the total price of the order, and then present all this as the contents of a typical shopping cart.
I'm having difficulty figuring out how to INSERT the selected products array into the "order_details" table. Could someone please help me with this?