Hi there!
Thank you for helping me out.
Here I will include the original files.
Objective: This is a example of what needs to be accomplish. I have some knowledge of php but I can't figure this out on my own. I need some guidence.
// This is what I need to incorporate in my form
$colors = array('black','red');
// output a radio button for each color,
foreach ($colors as $color) {
print '<input type="radio" name="color" value="' . $color . '" />';
print (ucwords($color));
}
// When the user submits the form,
print "You have chosen the color" . $_POST['color'];
+This works perfectly! It displays the buttons of two colors when you choose one of them the output is generated+
My problems starts within the form.php file exactly here ++:
<?php
// products portion of form
for ($row=0; $row < $num_products; $row++) {
$class = ( $row % 2 )? "even": "odd";
echo '
<tr class="' . $class . '">
<td>' . $products[$row][1] . '<input type="hidden" name="' . $products[$row][0] . '_title" value="' . $products[$row][1] . '"></td>
<td class="qty"> +Right here+ I need to learn how to incorporate the above exercise within this line.
For example, The arrays will be place in the inlcude.php file; The radio buttons will need to be place exactly here then the output will be generated on the order.php file. </td>
<td class="qty">$ ' . number_format($products[$row][2],2) . '<input type="hidden" name="' . $products[$row][0] . '_price" value="' . $products[$row][2] . '"></td>
<td class="lbl"><input class="cur" type="text" name="' . $products[$row][0] . '_qty" size="4" value="0" tabindex="' . ($row + 1) . '"
onchange="getProductTotal(this,this.form)" onclick="checkValue(this)" onblur="reCheckValue(this)"></td>
<td colspan="2" class="lbl">$<input class="cur" type="text" name="' . $products[$row][0] . '_tot" size="8" value="0" readonly onfocus="this.blur()"></td>
</tr>
';
}
?>
Any suggestion please!