I'm not quite sure what you're trying to do with the form params, but you have several errors in either your perl syntax or your html/css syntax (yext-decortation is normally spelled slightly differently;).
When passing css to an html element, the syntax is close but not exactly the same as you've used.
Try:
#!C:/Perl/bin/perl use strict; use CGI::Pretty qw( -debug ); use CGI::Carp qw( fatalsToBrowser ); my $q = new CGI; my $pay = $q->param(payment=>"discover","master","check"); my $pay_text; if ( $pay eq "discover" ) { $pay_text = "Discover Card"; } elsif ( $pay eq "discover" ) { $pay_text = "Master Card"; } elsif ( $pay eq "check" ) { $pay_text = "by check"; } else { $pay_text = "unknown method"; } print $q->header, $q->start_html( -title=>"Welcome", -bgcolor=>"pink"), $q->p({-style=>'text-decoration:underline;'},"Your name is ",$q- +>b("name")), $q->p("Your age is ", $q->textfield(-name=>"age")), $q->p("Your method of payment is ", $q->span({-style=>'color:blu +e;'},$pay_text)), $q->end_html;
In reply to Re: Can't produce a web page via CGI
by Melly
in thread Can't produce a web page via CGI
by zhshqzyc
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |