The Restaurant Order

The HTML Code
<html>
<body>
<u>The Restaurant
<br>
<FORM METHOD="POST" ACTION="http://jacknilan.tripod.com/cgi-bin/restaurant.pl"> Computer Experience:<BR> <INPUT TYPE="radio" NAME="choice" VALUE="Chicken">Chicken.<BR> <INPUT TYPE="radio" NAME="choice" VALUE="Hamburger">Hamburger.
<INPUT TYPE="radio" NAME="choice" VALUE="Hot Dog">Hot Dog
<INPUT TYPE="reset" VALUE="Clear"> <INPUT TYPE="submit" VALUE="submit"> </FORM> </body> </html>


See Code Work Here

The information from the form is sent to -> http://jacknilan.tripod.com/cgi-bin/restaurant.pl

There is a file at that location, written in Perl, called restaurant.pl that "catches the info sent by the form

The Perl Code (restaurant.pl)

#!/usr/local/bin/perl 
print "Content-type: text/html\n\n";
use CGI qw(param); 
$n = param('choice');
print "<html>";
print "<body>";
print "Your choice was  $n";
print "<br>";
print "</body>";
print "</html>";

The above Perl Code "catches" the info sent from restaurant.html. $n gets the value that was named choice.

<INPUT TYPE="radio" NAME="choice" VALUE="Chicken">Chicken.

If the person selected this radio button, the Value Chicken will be sent and then caught in the Perl code.

$n = param('choice');

says to put into variable $n whatever the value of choice was. We then create out own HTML page with this information.