#!/usr/bin/python3 """ runs on the server, prints HTML to create a new page; url=http://localhost/cgi-bin/server.cgi """ import os, cgi, sys debugmode = False # to help debug the script sys.stderr = sys.stdout # show error messages form = cgi.FieldStorage() # parse form data print('Content-type: text/html\n') # with blank line if debugmode: cgi.print_form(form) # print form fields in debug mode # html templates header = ''' Buy Your Way to a Better Health!

Thanks!

Your information has been recorded.

''' trailer = '''
''' def main(): # print html header print(header) # print values passed to the server by the form print('''
Name
%s
''' % "???") print('''
City
%s
''' % "???") print('''
Credit Card
%s
''' % "???") # print html trailer print(trailer) main()