Post HTML checkboxes?

Gustaf Liljegren gustafl at algonet.se
Mon Nov 12 12:37:03 CET 2001


For some reason, my the values of my (X)HTML checkboxes won't show up in the
CGI dictionary of name + values. I have a form with these two checkboxes:

<input id="drink1" type="checkbox" value="Zingo"/>
<input id="drink2" type="checkbox" value="Fanta" checked="checked"/>

This form is connected to a script that looks like:

#!/usr/usr/bin/python2.0

import cgi

form = cgi.FieldStorage()
print form.keys()

When I run this I get an empty list. Getting values from textboxes is no
problem.

--
Gustaf





More information about the Python-list mailing list