@fields should hold the fields that you want to validate. Does that make sense?use CGI; my $query = new CGI; my @fields = qw/name phone email/; for my $field (@fields) { print "$field is not defined" unless defined $query->param($field); }
In reply to Re: How do I detect and handle empty form fields?
by btrott
in thread How do I detect and handle empty form fields?
by rodry
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |