a way to make this more secured and better written?

2004-06-15 Thread Jason Gray
#!/usr/bin/perl -w use strict; use warnings; use CGI(); use Mail::Mailer; my $q = CGI->new(); print $q->header(); #- # * startup methods -> global variables. check_fields(); #- sub check_fields { my $blanks; m

Re: a way to make this more secured and better written?

2004-06-17 Thread Jason Gray
Is this how you were talking about getting rid of globals, and does this seem correct? #!/usr/bin/perl -T use strict; use warnings; use lib '/home/perl-lib/modules'; use CGI; use Email::Valid; use Mail::Mailer; my $q = CGI->new(); print $q->header(); check_fields($q); sub check_fields { my

Re: a way to make this more secured and better written?

2004-06-18 Thread Jason Gray
ddress($q->param('email'))) { print 'The email address entered was invalid.'; } } "Jason Gray" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > #!/usr/bin/perl -w > > use strict; > use warnings; > > us

Re: a way to make this more secured and better written?

2004-06-22 Thread Jason Gray
"Jason Gray" <[EMAIL PROTECTED]> wrote in message news:... > Could I do this? > > sub check_fields { > my $q = shift; > my $match; > my @fields = ('name', 'email', 'city', 'state', 'message'); > foreach m

Re: a way to make this more secured and better written?

2004-06-23 Thread Jason Gray
or would this be much better? #!/usr/bin/perl -T use strict; use warnings; use CGI(); use Mail::Mailer; my $q = CGI->new(); # Email address where form submits are sent. my $email = '[EMAIL PROTECTED]'; # Your subject for the form submits. my $subject = '[INFO] Site Comment'; print $q->header