Need help.
I am using Windows 2000 Server, IIS and PHP.
I created two pages as follows:
<form name="form1" method="POST" action="do_calculate.php">
<table width="400" border="0">
<tr>
<td>Enter the price per bag of coffee beans: </td>
<td><input name="price" type="text" id="price" size="10" maxlength="10"></td>
</tr>
<tr>
<td>Number of bags ordered: </td>
<td><input name="quantity" type="text" id="quantity" size="10" maxlength="10"></td>
</tr>
</table>
<br>
<input type="submit" name="Submit" value="Submit">
</form>
The other page I do some a calculation such as the following code and display the result:
$sub_total = $POST[price] * $POST[quantity];
echo "<P>Subtotal: $sub_total</P>";
I got the correct result but there was a warning displayed as follows:
Notice: Use of undefined constant price - assumed 'price' in c:\Inetpub\wwwroot\phpsite\do_calculate.php on line 11
Notice: Use of undefined constant quantity - assumed 'quantity' in c:\Inetpub\wwwroot\phpsite\do_calculate.php on line 11
What did I do wrong?