can't get cgi values
ronrsr
ronrsr at gmail.com
Mon Nov 27 14:58:20 EST 2006
Thank you, all. that was very helpful, and did solve many of my
problems. I was addressing the dict with () rather than [].
I'm still having one problem, though -- extracting the keywords. NOw,
if you check the value for Form below, you'll see there is more than
one keyword entry. When I do: keywords = form["keywords"] - what sort
of data structure do I get back?
th anks so much again.
-rsr-
if form.has_key("keywords"):
keywords = str(form["keywords"].value)
else:
keywords = "k"
fileHandle.write("here comes keywords:")
fileHandle.write(str(keywords))
fileHandle.write("keyword info");
fileHandle.write(str(form.has_key("keywords")))
fileHandle.flush()
> here's the info I know:
>
> form = FieldStorage(None, None, [MiniFieldStorage('zid', '17'),
> MiniFieldStorage('keywords', 'aAUA'), MiniFieldStorage('keywords',
> 'aBOS'), MiniFieldStorage('citation', '<i>The Earth Times Monthly</i>,
> April 2002\\r\\n \\r\\n \r\n '),
> MiniFieldStorage('quotation', 'Farm support goes mainly to a relatively
> small number of agri-businesses, many of them large corps. Yet these
> subsidies are 6 times what rich countries provide in foreign aid to a
> developing world that includes 5 billion people.\\r\\n \r\n
> '), MiniFieldStorage('updatebutton', 'Update')])
> form.has_key("citation") = True
>
>
More information about the Python-list
mailing list