<!
--
Simple form for ordering a pizza.
* Topping choices are specified as an array.
* Topping checkboxes are passed as an array.
-->
<html>
<head><title>Pizza Order Form</title></head>
<body>
<?php
$toppings = array("Olives", "Anchovies", "Onions", "Spinach");
?>
<h2>Pizza Order Form</h2>
<form action="order.php" method="get">
<p> <label for="size"><strong>Size</strong></label><br>
<input type="radio" name="size" value="small">
Small (10 inches)
<br>
<input type="radio" name="size" value="medium">
Medium (12 inches)
<br>
<input type="radio" name="size" value="large">
Large (14 inches)</p>
<p><label for="toppings"><strong>Toppings</strong></label><br>
<?php
foreach ($toppings as $item) {
echo "<input type='checkbox' name='toppings[]' value=$item> $item <br>";
}
?>
</p>
<p><label for="name"><strong>Name:</strong></label>
<input type="text" name="name" size=20></p>
<p><label for="phone"><strong>Phone:</strong></label>
<input type="text" name="phone" size=20> Example: 123-555-1212 or 555-1212
</p>
<p><input type="submit" value="Submit Order"></p>
</form>
</body>
</html>