Hello
I have orderform.html and processorder.php and I am using PHP5 on Apache2. Calculation results I get are $0. On the other hand when I run same files on another server (with previous versions of both PHP and Apache, I suppose) I get all calculations right. Can anyone help me fix it?
Code of files:
'Orderform.html'
<form action="processorder.php" method=post>
<table border=0>
<tr bgcolor=#cccccc>
<td width=150>Item</td>
<td width=15>Quantity</td></tr>
<tr>
<td>Tires</td>
<td align="center"><input type="text" name="tireqty" size="3" maxlength="3"></td>
</tr>
<tr>
<td>Oil</td>
<td align="center"><input type="text" name="oilqty" size="3" maxlength="3"></td>
</tr>
<tr>
<td>Spark Plugs</td>
<td align="center"><input type="text" name="sparkqty" size="3" maxlength="3"></td>
</tr>
<tr>
<td colspan="2" align="center"><input type="Submit" value="Submit order"></td>
</tr>
</table>
</form>
------------------------------------------
"processorder.php"
----
<html>
<head><title>Bob'Auto Parts-Order Results</title></head>
<Body>
<h1>Bob's Auto Parts</h1>
<h2>Order Results</h2>
<?php
define('TIREPRICE',100);
define('OILPRICE',10);
define('SPARKPRICE',4);
echo '<P>Order Processed at ';
echo date('H:i,
jS F');
echo '</p>';
echo '<P> your Order is as follows: </p> ';
$totalqty = $tireqty + $oilqty + $sparkqty;
echo 'Items ordered: '.$totalqty.'<br />';
$taxrate = 0.10;
$totalamount = $tireqty * TIREPRICE + $oilqty * OILPRICE + $sparkqty * SPARKPRICE;
echo 'Subtotal: $'.$totalamount.'<br />';
$totalamount = $totalamount * (1 + $taxrate);
echo 'Total including tax: $'.$totalamount;
?>
</Body>
</html>
--------------
Thank You
Nawaz