[Tutor] CGI Question
Mon, 08 Jul 2002 20:44:07 -0500
The following is the test code in python:
print "Content-Type: text/plain\n\n"
The_Form = cgi.parse_qs(pageID)
for pageID in The_Form.keys():
print "The text file is: " + pageID
The following is my html code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
<meta name="generator" content="BBEdit 6.5.2">
Click on the link below to test your CGI:
The file testtext just has the single line:
When I click on the link I get a server error message. I have everythin
working correctly because I can run some other python cgi scripts that
display text messages no problem. The cgi program has the correct executable
permissions and is located in the correct directory.
So my question is, what am I doing wrong?
Parse_qs should take the pageID and produce a dictionary with pageID as the
key and testtext as the value, correct?
Do I need to read the value of testtext and store it in a variable to be
written to the display?