I am going to offer a product with 4 attributes.
Size (2 choices – “16_inch” or “18_inch”)
Color (3 choices – “red” “black” “green”)
Logo (checkbox – “yes or no”)
Voltage (2 choices – “120” “240”)
The goal is to pick the selection that is wanted and go to that products page that fits the attributes requested. I will put the html form below so you can see the example of the form. My question is what is the best way to code the handle_form.php page? I am fairly new to php so any help would be appreciated.
This is the html form
<form action="handle_product_test.php" method="get">
<table>
<tr>
<td valign="top"><span class="style1">SIZE</span><br>
<select name="size" size="2">
<option value="16_inch">16 inch</option>
<option value="18_inch">18 inch</option>
</select>
</td>
</tr>
<tr>
<td valign="top"><span class="style1">Color</span><br>
<select name="color" size="3">
<option value="red">Red</option>
<option value="black">Black</option>
<option value="green">Green</option> </select>
</td>
</tr>
<tr>
<td class="style1">Logo <br>
<span class="style2">Yes</span><input name="logo_yes" type="radio" value="yes">
<span class="style2">No</span><input name="logo_no" type="radio" value="no">
</td>
</tr>
<tr>
<td valign="top"><span class="style1">Electrical Voltage</span><br>
<select name="voltage" size="2">
<option value="120">110/120 USA</option>
<option value="220">220/240 International</option></select>
</td>
</tr>
<br>
<br>
<tr>
<td><input name="submit" type="submit" value="Submit">
</td>
</tr></table></form>