// Establish the variables if they've been used previously. Doesn't matter if they haven't. $budget = $_REQUEST['budget']; $shipping = $_REQUEST['shipping']; $cclearance = $_REQUEST['cclearance']; $maf = $_REQUEST['maf']; $edi = $_REQUEST['edi']; $scclearance = $_REQUEST['scclearance']; $cartage = $_REQUEST['cartage']; $cit = $_REQUEST['cit']; $delivery = $_REQUEST['delivery']; $compliance = $_REQUEST['compliance']; $valet = $_REQUEST['valet']; $qif = $_REQUEST['qif']; $subtotal = $shipping + $cclearance + $maf + $edi + $scclearance + $cartage + $cit + $delivery + $compliance + $valet + $qif; $gst = $subtotal * 0.125; $total = $subtotal + $gst; $balance = $budget - $total; // Reset the variable if some has pressed the reset button // $action = $_POST["action"]; $action = $_GET["action"]; if ($action == "reset") { $budget = ""; $shipping = ""; $cclearance = ""; $maf = ""; $edi = ""; $scclearance = ""; $cartage = ""; $cit = ""; $delivery = ""; $compliance = ""; $valet = ""; $qif = ""; $subtotal = ""; $gst = ""; $total = ""; $balance = ""; } ?>
|
||||||||||||||||
|
||||||||||||||||
|
||||||||||||||||
|