I usually just take an array of "required" field names and loop through it and any that are blank get added to a scalar that contains an HTML list, like so:
use CGI; my $q = new CGI; my $missed; my @required = qw(name address phone email); for (@required) { $missed .= "<li>$_</li>\n" if $q->param($_) eq ""; } do { print "Content-type: text/html\n\n"; print qq~ You forgot to fill in the following required fields: <ul>$missed</ul> ~; } if $missed;
In reply to Re: Displaying an Error
by httptech
in thread Displaying an Error
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |