| author | johnathan.white@2718R8BGH51.accenture.com |
| Thu, 06 May 2010 18:20:27 +0100 | |
| changeset 64 | 6b63d9a6077b |
| parent 1 | 2fb8b9db1c86 |
| permissions | -rw-r--r-- |
#!/usr/local/bin/python """CGI test 2 - basic use of cgi module.""" import cgitb; cgitb.enable() import cgi def main(): form = cgi.FieldStorage() print "Content-type: text/html" print if not form: print "<h1>No Form Keys</h1>" else: print "<h1>Form Keys</h1>" for key in form.keys(): value = form[key].value print "<p>", cgi.escape(key), ":", cgi.escape(value) if __name__ == "__main__": main()