Using CGI with POST

David Hobley davidh at progmatics.com.au
Thu Oct 21 23:10:30 EDT 1999


Hello,
The form looks like this:
 <form method=GET
action="http://www.lineup.com.au/cgi-bin/search.cgi">
 <table align=center>
 <tr>
 <td><input type=text name="terms" size=40></td>
 <td><input type=submit value="Search!"></td>
 </tr>
 </table>
 </form>
I got the name wrong, I do look for "terms" in the cgi script.
There is only the one element posted.
Thanks.
PythonMaster wrote:
>> Hi!
>> Could you give more information.
>> There should be no difference between the POST and GET methods.
>> What's the HTML for the FORM element? Are you 'posting' other
> elements than the one called name?
>> /B
>> On 1999年10月21日, David Hobley wrote:
>> > Hello,
> >
> > I just knocked up a simple cgi script. It works fine if I
> > use the GET method on the form. However, if I try and POST
> > it, the script just hangs until it times out.
> >
> > Is there any special magic to make this work?
> >
> > The script does:
> >
> > form = cgi.FieldStorage()
> > form_ok = 0
> > if form.has_key("name"):
> > if form["name"].value != "":
> > form_ok = 1
> > ...
> >
> > but it hangs on the call to cgi.FieldStorage()
> >
> > Thanks.
> >
> > --
> > Cheers,
> > david davidh at progmatics.com.au
> >
> > Progmatics Pty Ltd - Architects of IT and Internet Solutions
> >
> > Level 8, 191 Clarence Street Phone +61 2 9262 4933
> > Sydney NSW Australia Fax +61 2 9262 4045
> > http://www.progmatics.com.au/
> >
> > --
> > http://www.python.org/mailman/listinfo/python-list
> >

-- 
Cheers,
david davidh at progmatics.com.au
Progmatics Pty Ltd - Architects of IT and Internet Solutions
Level 8, 191 Clarence Street Phone +61 2 9262 4933
Sydney NSW Australia Fax +61 2 9262 4045
http://www.progmatics.com.au/


More information about the Python-list mailing list

AltStyle によって変換されたページ (->オリジナル) /