#!"c:\python310\python.exe" import cgi import cgitb cgitb.enable() print("Content-Type: text/html;charset=utf-8") print() print ('''<html> <head></head> <body> ''') form = cgi.FieldStorage() if "name" not in form or "addr" not in form: print("<H1>Error</H1>") print("Please fill in the name and addr fields.") quit() print("<p>name:", form["name"].value) print("<p>addr:", form["addr"].value) print ('''</body> </html> ''')