import cgi, os, sys
sys.stderr = sys.stdout
data = cgi.FieldStorage()
formText = """Content-type: text/html\n
CGI Self-Post Form \n
Enter Quote
Received Quotes
"""
print formText
if data.has_key('name') and data.has_key('quote'):
f = open("quotes.dat", 'a')
f.write("%s: %s \n" % \
(data['name'].value,
data['quote'].value))
f.close()
f=open("quotes.dat", 'r')
if f:
print f.read()
f.close()