Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: Re: Input arrays to CGI

by sedhed (Scribe)
on Jul 24, 2002 at 07:24 UTC ( #184720=note: print w/replies, xml ) Need Help??


in reply to Re: Input arrays to CGI
in thread Input arrays to CGI

I haven't used that functionality. Nice. Upon inspection though, I see that when called in scalar context, param('list') returns the first item only. In list context it works, returning an array of the values of all fields named 'list'.
http://localhost/somefile.cgi?list=1&list=2&list=666 $list = param('list'); # $list is 1 @list = param('list'); # @list is (1, 2, 666)

With a list of checkboxes though, say for delete selection in a data table, I'd still have to use the map {/list_(.*)/}, param() trick, because I'd have to know which fields are checked.

Thanks for pointing that one out BUU

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (6)
As of 2021-01-25 10:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?