Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
second script# snippet from script 1 print qq(<FORM METHOD="post" ACTION="http://localhost/~sm125/cgi-bin/f +rontpage.cgi"><h3>Enter: </h3><INPUT TYPE="TEXT" NAME="box" SIZE="10" +><h3>Enter: </h3><INPUT TYPE="text" NAME="value" SIZE="10"><INPUT TYP +E="SUBMIT" value="go"></FORM>);
# snippet from frontpage.cgi #!/biol/programs/perl/bin/perl -w use strict; use CGI qw(:standard); my $cgi; $cgi = new CGI; use CGI::Carp qw(fatalsToBrowser); my $box = $cgi->param('box'); my $value = $cgi->param('value'); if (($box !~ /\w+/) && ($value !~ /\w+/)) { print "You haven't entered anything on the form"; print STDOUT $cgi->end_html; exit (0); }
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: CGI + safeguards
by valdez (Monsignor) on Feb 20, 2003 at 13:02 UTC | |
Re: CGI + safeguards
by Tomte (Priest) on Feb 20, 2003 at 13:04 UTC | |
Re: CGI + safeguards
by Joost (Canon) on Feb 20, 2003 at 13:13 UTC | |
Re: (nrd) CGI + safeguards
by newrisedesigns (Curate) on Feb 20, 2003 at 13:02 UTC | |
Re: CGI + safeguards
by jacques (Priest) on Feb 20, 2003 at 13:59 UTC |