Hello!
I have searched everywhere for an elegant solution to my dilemma, and have decided it's time to reach out and ask for help.
I work for a t-shirt screen printing company, and am in the process of creating a system that tracks all of our projects via php/mysql to replace our current system of paper forms and post-it notes.
I am starting out by creating a basic order form to be filled out during a customer consultation. I have the database all structured, and the rest of the form is fitting nicely into the database, but I'm stuck on getting one particular table of information populated properly.
Here's a rough picture of what this part of the form looks like:

(attached to this post as well)
The corresponding table structure is something like this:
| style | color | size | quantity | sale_price |
I'd like to have the form with around 15 blank rows, structured as per the image above, and have the corresponding input inserted into the table accordingly.
I know that I can have multiple text fileds with a name that's something like 'name[]', and have it end up as part of a multidimensional array in the $_POST variable, but that alone doesn't quite solve the problem.
A couple things I'm running into are:
How do I prevent ending up with 15 new rows in the table for every order, even if only one line of the form is needed?
If two lines in the form look something like:
Style | Color | S | M | L | XL | 2XL | Price
G200 | Blue | 5 | 7 |12| 9 | 15 | 8.50
5180 | Red | 3 | 20| 14| 19| 33 | 11.25
How do I make a total of 10 new rows in the table, one for each style/color/size combination?
A million thanks in advance to all the PHP peeps who respond. 🙂
-PF