use strict; use warnings; use CGI; my $cgi = new CGI; my $name = $cgi->param('name'); my $email = $cgi->param('email'); %emails = ... # fetched from database I assume if (defined $name && defined $email) { if (exists $emails{$email}) { # email exists in database already } else { # add email to system } } else { if (defined $name) { # email is missing } elsif (defined $email) { # name is missing } else { # everything is missing } }
In reply to Re: Form param checking
by Roger
in thread Form param checking
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |