Call Function for Reading Form Data
Please use the “Print” function at the bottom of the page to create a PDF.
For Linux Web Hosting packages and Managed Dedicated Servers
You want to process the data that was transferred with an HTML form using the POST or GET methods?
Include the CGI module in the script. It contains all important CGI functions, including the cgi.FieldStorage() function, which returns the form data as a dictionary (called 'hash' in Perl and PHP).
Here is the example code:
#!/usr/bin/python
import cgi
print "Content-Type: text/html\n\n"
my_form = cgi.FieldStorage()
for name in my_form.keys():
print "Input: " + name + " value: " + cgi.escape(my_form[name].value) + "<BR>"