in reply to Can anyone adjust my script correctly:)

first off
use strict; use CGI;
The first will help you catch a lot of prgramming errors, and the second will handle all the CGI interaction.

Aside from that....instead of using an if elsif construct, use a foreach over a set of required keys. With the if/else you'd only be able to report 1 error, when you'd really want to report them all. Try something like this.

my $query = new CGI; my %FORM = $query->Vars; my @required_fields = qw{candidate position education status hired}; my @errors; foreach (@required_fields) { if (!defined($FORM{$_})) { push(@errors,$_); } } if (@errors) { foreach (@errors) { print "$_ is a required field\n"; } } else { # everything is good, do the work }
HTH

/\/\averick
perl -l -e "eval pack('h*','072796e6470272f2c5f2c5166756279636b672');"