\n"; if(isset($_GET['ordered'])) { print "

this is your order

"; } else { print "

Enter your order

"; print "

Order more than $200 and get 15% off pre-tax total.

"; } print "\n"; print ""; print ""; $product_total=0; foreach ($product As $products) { $name=$products['name']; $price=$products['price']; $id=$products['id']; $ordered=$_GET['b'.$id]; $subtotal=$price*$ordered; $product_total=$product_total+$subtotal; $tax_total=0; $tax_total=$product_total * 1.0825; print ""; print ""; print ""; print ""; } print ""; print"
ProductPriceQuantitySubtotal
" . $name . "" . "\$" . $price . "" . "\$" . $subtotal . "
"; if ($product_total >=200){ $product_total=($product_total*.85); $tax_total=$product_total * 1.0825; } print "

the total cost of your order is " . "\$" . $product_total . "

"; if ($product_total >=200){ $savings=$product_total - ($product_total*.85); print "

You saved " . "\$" . $savings . "

"; } print "

the total cost of your order with tax is " . "\$" . $tax_total . "

"; if(!isset( $_GET['ordered'])) { print ""; } print "\n"; ?>