I see nothing on your form that goes against my original advice. The real question of which database schema really depends on how static the selections are.
For example, will your company only provide P20 Steel, H-13 Steel, 420 Stainless Steel, and 7075 Aluminum in the "Core and Cavity" attributes? If you will never provide anything more than those, then a SET-column or group of columns is not inappropriate. If, however, you will be adding more materials to that list, you should be using a related table to store the value(s).
I don't know, either, from where you are getting your values. If the available attributes are hard-coded, I strongly recommend you make the form database-driven. That way, instead of modifying code to add a new material to "Core and Cavity", you just add a new row to your "c_and_c_materials" table.
I also notice that you have HTML form element names that don't lend themselves well to programmatic use.
For example, your "Core and Cavity" form element names:
Code:
<input type="checkbox" name="P20CORECAV" Value="P20 Core and Cavity">P20 Steel<br>
<input type="checkbox" name="H13CORECAV">H-13 Steel<br>
<input type="checkbox" name="420SSCORECAV">420 Stainless Steel<br>
<input type="checkbox" name="7075CORECAV">7075 Aluminum<br>
<h4>Other Cavity</h4>
<input type="text" name="OTHERCAVITY"><br>
<h4>Other Core Type</h4>
<input type="textbox" name="OTHERCORE"><br>
will produce input in $_POST like:
Code:
Array
(
[P20CORECAV] => P20 Core and Cavity
[H13CORECAV] => on
[420SSCORECAV] => on
[7075CORECAV] => on
[OTHERCAVITY] =>
[OTHERCORE] =>
)
However, if you change the element names around a little:
, you can make the values a lot easier to get to in PHP:
Code:
<input type="checkbox" name="CORECAV[P20]">P20 Steel<br>
<input type="checkbox" name="CORECAV[H13]">H-13 Steel<br>
<input type="checkbox" name="CORECAV[420SS]">420 Stainless Steel<br>
<input type="checkbox" name="CORECAV[7075]">7075 Aluminum<br>
<h4>Other Cavity</h4>
<input type="text" name="CORECAV[OTHER][CAVITY]"><br>
<h4>Other Core Type</h4>
<input type="textbox" name="CORECAV[OTHER][CORE]"><br>
then in PHP, the input will look like:
Code:
Array
(
[CORECAV] => Array
(
[P20] => on
[H13] => on
[420SS] => on
[7075] => on
[OTHER] => Array
(
[CAVITY] =>
[CORE] =>
)
)
)
This latter way better lends itself to being able to traversing input through looping. This can be particularly useful of the values inside the brackets are table indeces from your database.
Want the best answers? Ask the best questions: TANSTAAFL!!