Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
<!DOCTYPE html> <html> <body> <FORM METHOD="POST" ACTION="/~zach3327/cgi-bin/c12case1.cgi"> Phoenix Industries:<br> <name="phoenix industries"> <br> Name:<br> <input type="text" name="name" value=> <br> Address:<br> <input type="text" name="address" value=> <br> City:<br> <input type="text" name="city" value=> <br> State:<br> <input type="text" name="state" value=> <br> ZIP code:<br> <input type="text" name="zip code" value=> <br> <br><br> <input type="submit" value="Submit"> <input type="reset" value="Reset" +> </form> </body> </html>
<HEAD><TITLE>Phoenix Industries</TITLE></HEAD> <BODY> <H1 ALIGN=center>Phoenix Industries<HR> Please press your browser’s back button to return to the form +. Then complete all items
#!/usr/bin/perl #c12case1.cgi -Location header use CGI qw(:standard); use strict; #declare and assign value to variable my ($name); $name = param('Name'); #create Hello page if($name ne "") { print "Content-type: text/html\n\n"; print "<HTML>\n"; print "<HEAD><TITLE>Phoenix Industries</TITLE></HEAD\n"; print "<BODY>\n"; print "<H1 ALIGN=center>Phoenix Industries<HR>\n"; print "Please return to your browser's back button to return to t +he form, $name!</H1></BODY></HTML>"; } else { print "Location: http://~zach3327/public_html/chapter12/c12case1b.html\n\n"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: What am I doing wrong here?
by haukex (Archbishop) on Apr 12, 2018 at 06:55 UTC | |
|
Re: What am I doing wrong here?
by haj (Vicar) on Apr 12, 2018 at 08:46 UTC | |
by haukex (Archbishop) on Apr 12, 2018 at 12:05 UTC |