# index.py from mod_python import util def index(req): util.redirect(req, "/web", permanent=1, text="""Click for NYQM.org""") def helloindex(req): cgimsg = "

CGI variables :

" try: cgi={} for i in req.form.list: if not i.name == "file": #don't take the uploaded file cgimsg += " [%s: %s]
" %(i.name, i.value) cgi[i.name]=i.value except: return "

Error retrieving cgi variables:

"+cgimsg cgilist=req.form.list msg="""

Site undergoing maintenance... please try again later.
(email dave@davebritton.com if you need more information.Hello World Page

Hello World!

cgi list is %s
Go to file uploader
Go to test
http://www.nyqm.org/web
http://www.nyqm.org/web/
http://www.nyqm.org/web/index.php
input something here:
"""%str(cgilist) def test1(cgi): msg =""" The value of test1 was %s.
cgi is: %s """%(cgi['test1'],str(cgi)) return msg def test(req): cgimsg='' if True: #try: cgi={} for i in req.form.list: if not i.name == "file": #don't take the uploaded file cgimsg += " [%s: %s]
" %(i.name, i.value) cgi[i.name]=i.value else: #except: return "

In test, Error retrieving cgi variables:

"\ + """str(req.form. """+'==dir(req.form): '+ str(dir(req.form))+"==req.form.list:"+str(req.form.list) msg=cgimsg if 'testform1' in cgi: msg +=""" The value of testform was %s.
cgi is: %s """%(cgi['testform1'],str(cgi)) return msg else: return """

The form didn't work.

"""