[Tutor] cgi scripts

Steve Willoughby steve at alchemy.com
Sat Nov 8 08:47:04 CET 2008

Jim Morcombe wrote:
> I want to print a list of the keys and their values passed to a cgi 
> script by an HTML form.
> I have tried this, but just seems to crash.

When you say "crash", what do you mean, exactly?
> Any ideas?

> print "Content-type: text/html\n"
> print "<title>CGI Form Response</title>\n"
> print "<h2>This is the data passed to the cgi script</h2><P>"

It wouldn't hurt to output fully-formed HTML here.

> print for k in data.keys():

I think you'll find the source of your problem right about here.

More information about the Tutor mailing list