in reply to Re: simple cgi script error
in thread [untitled node, ID 460085]
I haven't tested this, but should work#!/usr/bin/perl use warnings; use strict; use CGI qw/:standard/; use CGI::Carp qw(warningsToBrowser fatalsToBrowser); my $cgi=CGI->new(); print $cgi->header(); print $cgi->start_html(); my $value=$cgi->param('tapas'); ## No form check if possible print "Your favorite Tapas place in Barcelona was $value"; print $cgi->end_html();
Also, In your code code snippet, print the header first then try to call param().
|
|---|