You can see a prior discussion with a similar to same assignment on the web like this.
http://www.codingforums.com/showthread.php?t=263594
I'd post in that forum for more advice. No one seems to give solutions for homework.
My thought is that we should give answers. This way the person that got answers and didn't do the work will not be able to perform at work and open the door to those that did their own homework. Some think that's mean or cruel.
Bob
Hi, I'm new on CNET, I have been trying to display a Web page that contains the customer's name and address information and the product that was ordered. I have tried everything and still not getting the product ordered on mystore2.cgi. Any suggestions?
These are the codes I have so far:
HTML:
<HTML>
<HEAD><TITLE>My Store</TITLE></HEAD>
<BODY>
<H1 ALIGN=center>My Store</H1><HR>
<FORM METHOD="POST" ACTION="/~xxxxx/cgi-bin/mystore1.cgi">
<P><B>Please select your gift from the following options</B><BR><BR>
<INPUT TYPE=radio NAME=Gift Value=Diamond Bracelet CHECKED>Diamond Bracelet<BR><BR>
<INPUT TYPE=radio NAME=Gift Value=Tennis Bracelet> Tennis Bracelet<BR><BR>
<INPUT TYPE=radio NAME=Gift Value=Diamond Earrings> Diamond Earrings<BR><BR>
<INPUT TYPE=radio NAME=Gift Value=Pearl Earrings> Pearl Earrings<BR><BR>
<INPUT TYPE=radio NAME=Gift Value=Onyx Ring> Onyx Ring</P><BR>
<P><INPUT TYPE=submit VALUE=Submit> <INPUT TYPE=reset></P>
</FORM>
</BODY>
</HTML>
MYSTORE1.CGI
#!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 "<HTML>\n";
print "<HEAD><TITLE>My Store</TITLE></HEAD>\n";
print "<BODY>\n";
print "<FORM ACTION='http://xxxxxxx/~xxxx/cgi-bin/mystore2.cgi' METHOD=POST>\n";
print "<!hidden fields>\n";
print "<INPUT TYPE=hidden NAME=H_name VALUE='$name'>\n";
print "<INPUT TYPE=hidden NAME=H_street VALUE='$street'>\n";
print "<INPUT TYPE=hidden NAME=H_city VALUE='$city'>\n";
print "<INPUT TYPE=hidden NAME=H_state VALUE='$state'>\n";
print "<INPUT TYPE=hidden NAME=H_zip VALUE='$zip'>\n";
print "<INPUT TYPE=hidden NAME=H_gift VALUE='$gift'>\n";
print "<H1>My Store</H1><HR>\n";
print "<TABLE>\n";
print "<TR><TD>Name:</TD><TD><INPUT TYPE=text NAME=Name SIZE=25></TD></TR>\n";
print "<TR><TD>Street Address:</TD><TD><INPUT TYPE=text NAME=Street SIZE=40></TD></TR>\n";
print "<TR><TD>City:</TD><TD><INPUT TYPE=text NAME=City SIZE=25></TD></TR>\n";
print "<TR><TD>State:</TD><TD><INPUT TYPE=text NAME=State SIZE=25></TD></TR>\n";
print "<TR><TD>ZIP Code:</TD><TD><INPUT TYPE=text NAME=Zip SIZE=25></TD></TR>\n";
print "</TABLE><BR><BR>\n";
print "<INPUT TYPE=submit VALUE=Submit>\n";
print "</FORM></BODY></HTML>\n";
MYSTORE2.CGI
#!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 "<HTML>\n";
print "<HEAD><TITLE>My Store</TITLE></HEAD>\n";
print "<BODY><H2>\n";
print "<H1 ALIGN=center>My Store</H1><HR>\n";
print "<H3><B>You have entered:</H3></B><BR>\n";
print "<H4>$name<BR>\n";
print "$street<BR>\n";
print "$city<BR>\n";
print "$state<BR>\n";
print "$zip<BR><BR>\n";
print "<B>The Gift you ordered is:</B><BR>\n";
print "$gift<BR>\n";
print "</H4></BODY></HTML>\n";

Chowhound
Comic Vine
GameFAQs
GameSpot
Giant Bomb
TechRepublic