rendered paste body Purpose:Chapter 8 Exercise
-->
<html>
<head>
<title>SaveTheWorld Software</title>
<link rel ="stylesheet" type="text/css" href="sample.css" >
</head>
<body>
<h1>SaveTheWorld Software: Order Form</h1>
<?php
$os = $_POST['os'];
$numCopies = $_POST['numCopies'];
$subTotal = $numCopies * 35.75;
$salesTax = $subTotal * 0.07;
$shippingAndHandling = $numCopies * 1.00;
if ($numCopies < 1)
print("<p>ERROR: You must order at least 1 copy!</p>");
if ($numCopies < 5)
$shippingAndHandling = $numCopies * 3.50;
else
$shippingAndHandling = $numCopies * 0.75;
$totalCost = $subTotal + $salesTax + $shippingAndHandling;
print("YOUR ORDER: </p>");
print("<p>Operating System: $os</p>");
print("<p>Number of copies: $numCopies</p>");
print("<p>Sub-total: $$subTotal<br />");
print("<p>Sales tax: $$salesTax<br />");
print("Shipping and handling: $$shippingAndHandling<br />");
print("TOTAL: $$totalCost</p>");
?>
</body>
</html>