Hi all,
Here is my two files. orderform, and processorder.php.
I am using "POST" to pass the data the user enters in this simple form, but the data is not printed by processform.
I also tried 'get' and it does not work with that either. However it works with "REQUEST".
Oh, one more thing, when I use 'get' or 'post' I see the infomation being passed on through the address bar. I thought this was only for 'get' and not for 'post'.
I am using Windows XP, Apache 1.3, and php 5.0.
Thanks a bunch
masood
<html>
<body>
<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 name="Submit" type="submit" value="Submit Order"></td>
</tr>
</table>
</form>
</body>
</html>
and here is processform:
<?php
// create short variable names
$tireqty = $POST['tireqty'];
$oilqty = $POST['oilqty'];
$sparkqty = $_POST['sparkqty'];
?>
<html>
<head>
<title>Bob's Auto Parts - Order Results</title>
</head>
<body>
<h1>Bob's Auto Parts</h1>
<h2>Order Results</h2>
<?php
echo '<p>Your order is as follows: </p>';
echo $tireqty.' tires<br />';
echo $oilqty.' bottles of oil<br />';
echo $sparkqty.' spark plugs<br />';
?>
</body>
</html>