CGI getting multiple values with same name into a list
Michal Wallace (sabren)
sabren at manifestation.com
Mon May 8 17:58:47 EDT 2000
On Mon, 8 May 2000, Lee Joramo wrote:
> I am trying to process a web form but can not figure out the proper way to
> get mulitple values with the same name into a list. However, instead of
> getting a nice list, I get garbled MiniFieldStorage results For example, I
> have an html checkbox set with the name "select":
Try weblib! :)
http://weblib.sourceforge.net/
for: http://whatever/yourscript?select=cat&select=dog
you'd do:
#################
#!/usr/bin/python
import weblib.script
print weblib.request["select"], "<HR>" # prints "cat"
print weblib.request.query["select"] # prints ('cat', 'dog')
#################
Cheers,
- Michal
-------------------------------------------------------------------------
http://www.manifestation.com/ http://www.linkwatcher.com/metalog/
-------------------------------------------------------------------------
More information about the Python-list
mailing list