I have the below table:
<table class="authors-list" border=0 id="ordertable">
<tr>
<td ><input type="text" id="product_1" name="product_1" class="rounded"/></td>
<td ><input type="text" size='5' id="qty_1" name="qty_1" class="rounded"/></td>
<td class="tdcheckbox"><input type="checkbox" id="h09_1" name="h09_1" class="rounded"/>
<input type="text" id="line_1_09" name="line_1_09" value=""></td>
<td class="tdcheckbox"><input type="checkbox" id="h12_1" name="h12_1" class="rounded"/>
<input type="text" id="line_1_12" name="line_1_12" value=""></td>
<td class="tdcheckbox"><input type="checkbox" id="h15_1" name="h15_1" class="rounded"/>
<input type="text" id="line_1_15" name="line_1_15" value=""></td>
<td><input type="text" name="cubespercheck_1" id="cubespercheck_1" value="0" size=5></td>
</tr>
</table>
you can see the fiddle here: http://jsfiddle.net/3Befc/7/
My main goal is to be able to post each checkbox as an individual product. the product field is populated with a product family. example is 38114CR. the checkboxes represent the lengths of the product. the code for a 1.8 meter length of 38114CR is 3811418CR where 18 is the length (1.8)
In the end, I want to be able to post each checked checkbox as its unique product code. so if 0.9 is checked for product 38114CR post the value 3811409CR.
My ultimate goal is to insert the following into a database: (this is as per the fiddles desired result)
**Product Cubes**
3011409CR 7
3011412CR 7
2011512EX 3
2011515EX 3
5050009PT 2
5050012PT 2
5050015PT 2
The only way I can think of is to loop through the table, and where there is a checked checkbox, combine the name and the length but even that has some challenges.
How can I get the above table rows to insert into a database? so horizontal row to vertical record insert?
Keep in mind that the user can input any product code they want.