I have a form here, I have set the checkbox value to that of the respective pricing of that product. The textbox is for users to key in the quantity they want. In my PHP file, then I would compute the total amount submitted in an order form but I can't seem to get it right. The name of my checkboxes is "prodID[]" and that of my textboxes is "prodQty[]". The code below is what I have done in my php file.
echo '<td width="200px"><input name="prodID[]" id="'.$row['prodAmt'].'" type="checkbox" value="'.$row['prodAmt'].'">';
echo '<input name="prodQty[]" type="hidden" value="0"><input name="prodQty[]" id="'.$row['prodID'].'" type="text" size="1" value="" >';
$orderQty[] = $_POST['prodQty'];
$orderAmt[] = $_POST['prodID'];
for ($i=0; $i < count($orderQty); $i++) {
$multiple[$i]=$orderQty[$i]*$orderAmt[$i];
}
$amount = array_sum($multiple);
