Hi, I'm new on Perlmonks, 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 Bra +celet<BR><BR> <INPUT TYPE=radio NAME=Gift Value=Tennis Bracelet> Tennis Bracelet<BR> +<BR> <INPUT TYPE=radio NAME=Gift Value=Diamond Earrings> Diamond Earrings<B +R><BR> <INPUT TYPE=radio NAME=Gift Value=Pearl Earrings> Pearl Earrings<BR><B +R> <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 dat +a 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 SI +ZE=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></T +D></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";

In reply to Calling a radio button to the second cgi script by SuzieB

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.