Thanks For Ordering From Us! Qty Item # Description Unit Price Ext. Price"; for($i=1;$i<=5;$i++) { $curQty = "qty".$i; $curItemNum = "itemnum".$i; $curDesc = "desc".$i; $unitPrice = "price".$i; $weight = "nums".$i; if($_POST[$curQty] > 0) { //assign the form's post information to variables $qty = clean($_POST[$curQty]); $itemNum = clean($_POST[$curItemNum]); $desc = clean($_POST[$curDesc]); $unitPrice = clean($_POST[$unitPrice]); $weight = clean($_POST[$weight])*$qty; $exPrice = $unitPrice*$qty; $prodTotal = $prodTotal+$exPrice; $totalWeight = $totalWeight+$weight; //echo "weight: $weight
totalWeight: $totalWeight
"; $shipChge = 1.25*$totalWeight; $salTax = $prodTotal*.0775; $invTotal = $prodTotal+$shipChge+$salTax; echo " $qty $itemNum $desc $".number_format($unitPrice,2)." $".number_format($exPrice,2)." "; }//endif }//endfor echo "Product Total$".number_format($prodTotal,2)." Shipping Charge$".number_format($shipChge,2)." Sales Tax$".number_format($salTax,2)." Invoice Total$".number_format($invTotal,2)." "; }//endfunction function clean($string) { $string = stripslashes($string); $string = htmlentities($string); return $string; } function loadQty() { echo ""; for($i=1;$i<=10;$i++) { echo ""; } } $action = clean($_GET[action]); if(isset($action) && $action == "submit") { getHttpVars(); echo "
If there was an error, go back if not, proceed to checkout
"; } else { ?>
Quantity Item # Description Price Weight
1111 Gizmo $4.95 5
2222 Widget $6.95 3
3333 Wingding $13.95 12
2222 Gadget $.69 25
2222 Super Gizmo $169.99 64