Not sure if the inputs' types need quotes, so try unquoting if it's not working. With this, your browser will take care of all syntax matters as to how to access your script ; if it doesn't work, try renaming it to .cgi.

It's really late, I just hope I'm making sense.

Time is the greatest of teachers ; sadly, it kills all of its students.
- Hector Berlioz

If you have Python 2.3 you can also check is the key exists in a dictionary using this (much) cleaner method. although for now the number of servers running Python 2.3 is kinda low, but for a localhost...

you should note that using raw_input() in a webpage is a bad idea, often leading to an error... that is unless you have submitted a form using POST methods to that page in which case it displays a --------number string, nothing more .

Why are you using the getvalue('key') method to access the value in you're form, since we've already desided that the form value exists (in the if statment) and you're not setting a default value anyway . Why not use this form.

Code:

>>> d = {'a': 1, 'b': 2, 'c': 3}
>>> d['a']
1
>>> d['b']
2
>>>

This is just a dictionary, in FieldStorage() you need to append .value to then end of you're dictionary what variable you want i.e.

Code:

>>> d['c'].value #Note don't try this with a normal dictionary :) or you'll get a nice error message; but works with FieldStorage()
3