in reply to Variable from a variable: the dark side?
FETCHING THE VALUE OR VALUES OF A SINGLE NAMED PARAMETER:
@values = $query->param('foo');
-or-
$value = $query->param('foo');
Or you can have an array of names and do something like,
It really depends on what you are going for. If you want a user to select some out of many, checkboxes or radio buttons with the same name is the way to go, with the first option. If you want a bunch of different values, you can do the second one, but you may be better off with straight forward like...foreach my $key ( @expectedVars ) { print $query->param( $key ); }
Play w/ it, see what you like.if( $query->param( 'agreed' ) eq 'yes' ) { ... } if( $query->param( 'uppercase' ) eq 'sure' ) { ... }
|
|---|