Forum Moderators: coopster
Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in C:\xampp\htdocs\OrderProcessed.php on line 23
I understand by reading in the forums that the error may not necessarily be on Line 23. Unfortunately, I don't know where the error is. Please help :)
<?
echo "<P>Order Processed.";
echo date("H:i, jS F");
echo "<br>";
echo $tireqty." tires<BR>";
echo $oilqty." bottles of oil<BR>";
echo $sparkplugqty." spark plugs<BR>";
$totalqty = 0;
$totalamount = 0.00;
define("TIREPRICE", 100);
define("OILPRICE", 10);
define("SPARKPLUGPRICE", 4);
$totalqty = $tireqty + $oilqty + $sparkplugqty;
$totalamount = $tireqty * TIREPRICE
+ $oilqty * OILPRICE
+ $sparkplugqty * SPARKPLUGPRICE;
$totalamount = number_format($totalamount, 2);
echo "<BR>\n";
echo "Items ordered: ".$totalqty."<BR>\n;
echo "Subtotal: ".$totalamount."<BR>\n;
$taxrate = 0.10; // local sales tax is 10% here
$totalamount = $totalamount * (1+$taxrate);
$totalamount = number_format($totalamount, 2);
echo "total Including Tax: $".$totalamount."<BR>\n";
?>