in reply to Perl Security - Prevent SPAM
1. You don't need to include <br> inside <code> tag.
2. Parsing part is so crappy :) But don't worry - I used it too :)
When you have something like that (inside $query you have an CGI object) you can easily get any post or get parameter passed to your script easily.#!perl use strict; # this is a MUST! use CGI; # so you don't parse it by hand my $query = CGI->new(); # my is because of strict pragma print $query->header(); # so you don't do it by hand print "Hello World!";
In this case, $form will contain a hashref of form fields. So if you want to say print value of field called "name" :my $form = $query->Vars();
Now let's address your Show_Critical_Error() function :)print $form->{name};
And it will print a relatively nice error message to the browser ;)use CGI::Carp qw(fatalsToBrowser); .... .... if($error) { die "Error message"; }
I believe this is enough to get you started! There are many more things to learn, but take them one by one ...
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Perl Security - Prevent SPAM
by jazzwill (Initiate) on Oct 07, 2005 at 03:04 UTC | |
by GrandFather (Saint) on Oct 07, 2005 at 03:12 UTC | |
by jazzwill (Initiate) on Oct 07, 2005 at 11:43 UTC | |
by eXile (Priest) on Oct 07, 2005 at 14:10 UTC |