First of all, you need to keep in mind that HTML form data is structured in name/value pairs taken from the form's <input> elements based on the contents of their 'name' and 'value' attributes. When the form is "submitted", that data is sent to the target of the <form> tag's 'action' attribute. In this case, the target is your PHP script file named "OnlineOrders.php", which will need to determine several things: which items are being ordered, the quantity of each item ordered, any options (like size or color), and the respective prices. So your <form> needs to include all of that information in <input> elements as well as displaying it all to the user in a way that makes it clear what each <input> element requires of him/her.

When an order form consists of a list of items, the process can be a little complicated because each ordered product's information must be sent together. So you need to devise a way to encode the 'name' attributes in a way that the PHP script can decipher and identify the information for each individual product. This is often done by using a value for the 'name' attribute that is a combination of the product identifier and which product attribute is being sent. For example, the <input> for a product's quantity might be given the name "shoe_qty", which a PHP script can easily use the explode() function to split on the "_" character to separate the two. For data that is fixed for each item and which doesn't get entered by the user (like the price!), you just use <input type="hidden"> to pass the information.

Once you have your <form> properly constructed, you'll need to write the PHP script to process the information. For that, you should search on "PHP forms tutorial". Pick one. It won't matter much which you choose because the basics are pretty simple. Once you write a script that properly receives and interprets the form data, you should have no trouble figuring out what to do next. Good luck!

Keep in mind all inputs, even the buttons, have to stay in the form you want to submit.

Your OnlineOrders.php will collect the forms data in the $_POST array. For starters try typing this in that file to see what happens:

echo '<pre>';
print_r($_POST);
echo '</pre>';

Once you see what's going on there and what is going where you'll need to look into the some of the following:
- sanitization
- validation
- sql injection (if you use those values in a database) - prepared statements as an easier solution to that problem

You might also want to consider posting that to the same php file and having different behaviour when some values exist, but that's after you figure out the basics, just remember the option exists^^

Direct your browser to your form page and submit the form. Once the browser is redirected to OnlineOrders.php, you should be looking at PHP codes on the page. Copy those codes and paste it on the OnlineOrders.php and save it as your form processor. You can add a little more codes to save it to your database or anything to serve for your purpose.

I am always amazed what I am capable of whenever I am having a lazy day... :) :)

don't forget to add

<?php

on top of the page... :)

Update:

I just want to add that this part of the codes above

$submitted_value

That can be referenced later on for validation e.g. integer, empty, null, string, or whatever