My Store


Please select your gift from the following options

Diamond Bracelet

Tennis Bracelet

Diamond Earrings

Pearl Earrings

Onyx Ring


#### #!usr/bin/perl #mystore1.cgi - contains a form that allows the user to enter form data print "Content-type: text/html\n\n"; use CGI qw(:standard -debug); #prevent Perl from creating undeclared variables use strict; #declare variables my ($name, $street, $city, $state, $zip, $gift); my @gifts = ("Diamond Bracelet", "Tennis Bracelet", "Diamond Earrings", "Pearl Earrings", "Onyx Ring"); #assign input items to variables $name = param('Name'); $street = param('Street'); $city = param('City'); $state = param('State'); $zip = param('Zip'); $gift = param('Gift'); print "\n"; print "My Store\n"; print "\n"; print "
\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "

My Store


\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "
Name:
Street Address:
City:
State:
ZIP Code:


\n"; print "\n"; print "
\n"; ##
## #!usr/bin/perl #mystore2.cgi - display Web page containing all information entered on previous pages print "Content-type: text/html\n\n"; use CGI qw(:standard -debug); #prevent Perl from creating undeclared variables use strict; #declare variables my ($name, $street, $city, $state, $zip, $gift); my @gifts = ("Diamond Bracelet", "Tennis Bracelet", "Diamond Earrings", "Pearl Earrings", "Onyx Ring"); #assign input items to variables $name = param('Name'); $street = param('Street'); $city = param('City'); $state = param('State'); $zip = param('Zip'); $gift = param('Gift'); #create Web page print "\n"; print "My Store\n"; print "

\n"; print "

My Store


\n"; print "

You have entered:


\n"; print "

$name
\n"; print "$street
\n"; print "$city
\n"; print "$state
\n"; print "$zip

\n"; print "The Gift you ordered is:
\n"; print "$gift
\n"; print "

\n";