#!/usr/bin/python
# -*-python-*-

print "Content-Type: text/html\n"
import sys, os, string, cgi

from types import ListType

print "Form submission parameters"
form = cgi.FieldStorage()
print "
Received parameters:
"
print "
"
for k in form.keys():
    v = form[k]
    if isinstance(v, ListType):
        vs = []
        for item in v:
            vs.append(item.value)
        text = string.join(vs, ", ")
    else:
        text = v.value
    print "%s: %s" % (cgi.escape(k), cgi.escape(text))
print "
"
