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; $shipChge = $qty*$weight*1.25; $salTax = $prodTotal*.0775; $invTotal = $prodTotal+$shipChge+$salTax; echo " $qty $itemNum $desc $".number_format($unitPrice,2)." $".number_format($exPrice,2)." "; }//endif }//endfor $totalWeight = number_format($qty*$weight,2); //$shipChge = $totalWeight*1.25; 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 ""; } } ?>