Casey Bralla on 22 Nov 2011 15:05:17 -0800


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

[PLUG] Solved! Python CGI Problem w/ GET and POST


> >

> > Any python CGI programmers on the list?

> >

> >

> >

> > I've got a weird problem. I can use the "get" command to send data to my

> > cgi script (running python), but if I use "post", I get no data at all.

> >

> > <FORM action="" method="get">

> > <INPUT type="submit" value="Project Summary" >

> > </FORM>

> >

> >

> >

> > This works, and the cgi.FieldStorage() routine correctly picks up the

> > data sent with the input command. Also, the data appears on the URL

> > line.

> >

> >

> >

> > However, if I substitute a "post" for "get", the URL line is blank (as

> > it

> > should be), but cgi.FieldStorage is completely null.

 

 

It turns out I was double reading the cgi.FieldStorage object, so it was null the second time. (Duh!) I hate getting old....

 

 

--

 

Casey Bralla

Chief Nerd in Residence

 

The NerdWorld Organisation

http://www.NerdWorld.org

___________________________________________________________________________
Philadelphia Linux Users Group         --        http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug