#!/usr/bin/python # Import modules for CGI handling import cgi, cgitb # Create instance of FieldStorage form = cgi.FieldStorage() print "Content-type:text/html\r\n\r\n" print "# of data fields: %s" % len(form) # Get data from fields for key in form.keys(): print "key: %s - value: %s " % (key, form.getvalue(key))