Create a web application for a takeout pizza restaurant. The application will consist of two
files:
• pizza.html
• order.php
pizza.html
Create an HTML page where a customer can order takeout from pizza restaurant.
The file should have a form whose action is order.php and whose method is get. The form
should have the following items:
• Three text boxes where the customer can enter their
o Name
o Phone number
o Street address.
• A pair radio buttons for pizza size: Medium and Large. By default, neither should be
selected.
• A series of 5 checkboxes for ingredients:
o Pepperoni
o Sausage
o Mushrooms
o Onions
o Green peppers
The form should have a call to a JavaScript function that performs validation. It should
ensure that
• All three text boxes have something in them
• One of the radio buttons should be selected.
It is not necessary that one of the ingredients is checked–that just means a cheese pizza. If
there is any problem with the form, it should not be submitted to the server. You should
open an alert box and let the user know that they are missing. Note:
If the form is ok, it should be submitted to order.php
order.php
Place order.php in the htdocs, just like pizza.html. The code should use the PHP special
variable $_GET to extract the information from the order request, compute the price and
send HTML back to the user to let the user know the price and that the pizza will arrive in a
half hour.
If there is any missing data in the request, the PHP code should send back HTML that says
there was an error with the order, and then gives the customer a link back to the
pizza.html page.
The pizza price is
• $10 for a medium pizza,
• $12 for a large pizza
• 50¢ for each topping
• $2 delivery fee