I have two files:
phpform.htm and process.php
which have the following code(which I got from an online tutorial):
phpform.htm:
Code: Select all
<html><body>
<h4>Tizag Art Supply Order Form</h4>
<form action="process.php" method="post">
<select name="item">
<option>Paint</option>
<option>Brushes</option>
<option>Erasers</option>
</select>
Quantity: <input name="quantity" type="text" />
<input type="submit" />
</form>
</body></html>process.php
Code: Select all
<html>
<body>
<?php
$quantity = $_POST['quantity'];
$item = $_POST['item'];
echo "You ordered ". $quantity . " " . $item . ".";
echo "Thank you for ordering from Tizag Art Supplies!";
?>
</body>
</html>Every time enter data in the html form and hit submit, a blank page (no echo data) shows up.
I am using PHP Designer 2005 and WAMP with PHP. If I just run the php code on its own, it seems to work okay with the output, "You ordered .Thank you for ordering from Tizag Art Supplies! " so I'm slightly confused.
Any help would be greatly appreciated.
Thanks,
-Leia Chancellor
