import cgi form = cgi.FieldStorage() text1 = form.getvalue("text1") text2 = form.getvalue("text2") # print HTTP/HTML headers print """Content-type: text/html
In the first text box, you entered " + text1 + ".
" print "In the second text box, you entered " + text2 + ".
" print ""