use CGI; # Gets a HTTP paramater from CGI->param() with error checking. # $_[0] = param to get # $_[1] = default value if the param is not defined sub getparam { $query = new CGI; ($param, $value) = (@_,""); if (defined(CGI->param($param))) { return CGI->param($param); } else { return $value; } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Get a CGI::param() variable with undef checking.
by Your Mother (Archbishop) on Nov 13, 2004 at 08:17 UTC |