[python-win32] cgi fieldstorage
Tim Roberts
timr at probo.com
Fri Nov 16 19:09:57 CET 2007
kNish wrote:
> Hi,
>
> to get a text field value from a php page, getvalue function is used.
>
> .
> .
> form = cgi.FieldStorage()
> artist = form.getvalue('artist')
>
Well, that's one way. You can also use form['artist'].value, which is
the style I've seen most often. You can use whichever one makes sense
to you.
> To get a value from a drop down box, what function should be used.
>
It's exactly the same. HTTP GET and POST data doesn't know what kind of
field it was. It's just a list of name=value pairs
--
Tim Roberts, timr at probo.com
Providenza & Boekelheide, Inc.
More information about the python-win32
mailing list