#!/usr/bin/python import cgi form = cgi.FieldStorage() # parse form data print "Content-type: text/html\n" # hdr plus blank line print "Reply Page" # html reply page if not form.has_key('user'): print "

Who are you?

" else: print "

Hello %s!

" % cgi.escape(form['user'].value)