import cgi import cgitb; cgitb.enable() # Optional; for debugging only print "Content-Type: text/html" print
f = cgi.FieldStorage() for i in f.keys(): print "<p>",i,":",f[i].value abcd wrote: > i want to create a CGI script which simply prints out values given via > the URL (such as when a GET is performed). > > So if I have a script named, foo.cgi ....and I access it by going to: > > http://www.somesite.com/cgi-bin/foo.cgi?name=john&age=90 > > I want foo.cgi to print out: > name: john > age: 90 > > > how do i get the values from the URL like that? > > thanks > -- http://mail.python.org/mailman/listinfo/python-list