Ok, just learning and working on forms, but I can't seem to get the 2 input variables to be passed...The book im reading says to put <?php_track_vars?> at the beginning of the scripts, but anywhere I put it is messed up. Heres the html code and the php code, thx for any help.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<html>
<head><title>Bean Counter Form</title></head>
<body>
<FORM method="POST" action="do_calculate.php">
<P>Enter the price per bag of coffee beans: <INPUT type="text" name="price" size=10
maxlength=10></P>
<P>How many bags would you like? <INPUT type="text" name="quantity" size=10
maxlength=10></P>
<INPUT type="submit" value="Submit">
</FORM>
</body>
</html>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<html>
<body><head><title>Bean Counter Results</title></head>
<?php
$sales_tax = .0825;
$sub_total = $price $quantity;
$sales_tax_amount = $sub_total $sales_tax;
$sales_tax_pct = $sales_tax * 100;
$grand_total = $sub_total + $sales_tax_amount;
$fmt_price = sprintf("%0.2f",$price);
$fmt_sub_total = sprintf("%0.2f",$sub_total);
$fmt_sales_tax_amount = sprintf("%0.2f",$sales_tax_amount);
$fmt_grand_total = sprintf("%0.2f",$grand_total);
echo "<P>You ordered $quantity bags of coffee.</P>";
echo "<P>Bags of coffee are \$$fmt_price each.</P>";
echo "<P>Your subtotal is \$$fmt_sub_total.</P>";
echo "<P>Sales tax is $sales_tax_pct% in this location.</p>";
echo "<P>\$$fmt_sales_tax_amount has been added to your order.</p>";
echo "<P>You owe \$$fmt_grand_total for your coffee.</p>";
?>
</body>
</html>