i wrote this code
and when i run it everything works except the fopen() function it always defaults to your order could not be processed
i think it has something to do with thepath i am giving to open file but i do not know the correct path to enter for a win 2000 box any body been through this before?
<html>
<head><title>Bobs Auto Parts - Order Results</title>
</head>
<body>
<h1>Bobs Auto Parts</h1>
<h2>Order Results</h2>
<?php
define("TIREPRICE", 100);
define("OILPRICE", 10);
define("SPARKPRICE",4);
$totalqty = $tireqty + $oilqty + $sparkqty;
if($totalqty == 0)
{
echo "You did not order anything on the previous page!<br>";
}
else
{
echo "<p>The date of your order is: ";
echo date("H:i, jS F");
echo "<br>";
echo "<p>Your order is as follows:";
echo "<br>";
echo $tireqty." tires<br>";
echo $oilqty. " quarts of oil<br>";
echo $sparkqty. " Spark plugs<br>";
$totalamount = $tireqty TIREPRICE
+ $oilqty OILPRICE + $sparkqty SPARKPRICE;
$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%
$totalamount = $totalamount (1 + $taxrate);
$totalamount = number_format($totalamount, 2);
echo "Total including tax: $".$totalamount."<br>\n";
echo "Shipping Address is ".$address."<br>\n";
$outputstring = date("H:i, jS F")."\t".$tireqty. "tires \t".$oilqty." oil\t"
.$sparkqty." spark plugs\t\$".$totalamount."\t".$address."\n";
@ $fp = fopen("C:\\Inetpub\orders\orders.txt", "a+");
if(!$fp)
{
echo "<p><strong> Your order could not be processed at this time. ".
"please try again later.</strong></p>";
exit;
}
else
{
fwrite($fp, $outputstring);
}
fclose($fp);
} // end of else
?>
</body>
</html>