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 cgi 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. Their parameters are retrieved in the cgi file by using the "param()" function. #!/usr/bin/perl -Tw use CGI qw(:standard); print header(); print "
";
my $drink = param("drink");
my $milk = param("milk");
my $cake = param("cake");
if ($drink eq "tea") {print "You requested tea";}
elsif ($drink eq "coffee"){print "You requested coffee";}
elsif ($drink eq "hot chocolate"){print "You requested hot chocolate";}
else {print "An error occured.";}
if ($milk eq "yes") {print " with milk";}
print ".
";
if ($cake) {print "Sorry, we are out of $cake."}
print "
Thank you for your visit. Please come again.