Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris

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?

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

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (1)
As of 2022-08-16 06:35 GMT
Find Nodes?
    Voting Booth?

    No recent polls found