Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: How do I detect and handle empty form fields?

by btrott (Parson)
on Apr 17, 2000 at 04:09 UTC ( [id://7787]=note: print w/replies, xml ) Need Help??


in reply to How do I detect and handle empty form fields?

Are you using CGI.pm? If so, you could use something like this:
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); }
@fields should hold the fields that you want to validate. Does that make sense?

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://7787]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (7)
As of 2024-04-24 11:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found