5) Add a checkbox to the form (such as "Do you want milk? Yes/No") and
a text area where customers can type in what kind of cake they
would like to order. Change your PHP script so that it includes
these in its reply, such as "you requested tea with milk", "sorry
we are out of chocolate cake". The checkbox and text area must have
distinct names in the form.
Tea is served
Tea Room
Thank you for your visit. Please come again.
-------------------------------------------------------------------------
6) For the greeting card example, write a PHP script that prints "you
have selected image ..." and the number of the image selected. Then
the PHP script prints textboxes for the recipient's email address,
the recipient's name and the message.
Greeting Card
Your Card:
";
echo "
";
?>
-------------------------------------------------------------------------
7) The greeting card example shows that parameters can be added to a
URL (for example "greeting?image=3"). Try what happens if you enter
parameter values other than 1, 2, 3 or 4. Add an if statement to
your PHP script that prints "not an acceptable selection" if the
image number is not 1, 2, 3 or 4.
Greeting Card
Your Card:
= 1 and $_REQUEST['image'] <= 4) {
echo "You have selected image ", $_REQUEST['image'];
echo " ";
echo "