Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: Re: Input arrays to CGI

by sedhed (Scribe)
on Jul 24, 2002 at 07:24 UTC ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://184720]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (6)
As of 2024-03-28 10:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found