can't get cgi values

ronrsr ronrsr at gmail.com
Mon Nov 27 13:28:54 EST 2006


I'm having trouble extracting cgi parameters in my code - this is a web
application, so I only know the line that's causing the problem.

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



     fileHandle.write("here aer the haskeys");
     fileHandle.write( str(form.has_key("citation")))
    /* returns TRUE */

     temp = str(form("citation").value)
         /* python stops here,

            form("citation appears to be undefined */



     print (str(form("citation").value))
  /* this doesn't work, either */




     if form.has_key("keywords"):                                  /*
neither does this */
         keywords = str(form["keywords"].value)
     else:
          keywords = "k"

  




any ideas on what the problem is? 

thank you so much. 

-rsr-




More information about the Python-list mailing list