Hey guys, it's me again... I thought I was done; just real close.
I have a form that looks like this:
Basically, if the user would like to add that particular "desert" to their order, they would first have to check the checkbox and then type in a qty. My problem comes in with user error. If the user does not check the checkbox, but enters a quantity, it is not going to show up on the summary page... they physically need to check that box!
while( $desertlist = mysql_fetch_array( $desertquery ) )
$desertCheckboxes .='<tr><td><font face="verdana" size="2" color="#000000"><input type="checkbox" name="DesertName['.$i.']" value="'
. '<td><font face="verdana" size="2" color="#000000"><input type="text" size="3" name="DesertSlices['.$i.']"></td>'
The output looks like this:
So basically, the check box selects the desert name, and the textbox enters a quantity. Nothing happens unless the box is checked. Could I activate the "DesertName" with just entering a value in the textbox?
echo '<tr><td bgcolor="#CCCCCC"><font size="3"><b>Desert Name</b></td><td bgcolor="#CCCCCC"><font size="3"><b>Slices</b></td></tr>';
$DesertName = $_POST['DesertName'];
$desertslices = $_POST['DesertSlices'];
foreach ($DesertName as $i=>$Desert)
echo '<td><font size=3> ' . $Desert . '</td>';
echo '<td><font size=3> ' . $desertslices[$i] . '</td>';