Multiple Select

Victor Subervi victorsubervi at gmail.com
Fri Oct 2 23:58:24 CEST 2009


I have the select called variable "these". Whichever option is selected is
passed through the cgi:

import cgitb; cgitb.enable()
import cgi

form = cgi.FieldStorage()
these = form.getfirst('these', '')

As I mentioned before, I get the variable all right. That is not the issue.
What is the issue is that I would like to enable the user to select
*several* options; in essence, to turn "these" into a tuple. That way, I
could capture *several* options and enter them all into my database at once.
TIA,
V


On Fri, Oct 2, 2009 at 4:46 PM, Rami Chowdhury <rami.chowdhury at gmail.com>wrote:

> On Fri, 02 Oct 2009 14:25:55 -0700, Victor Subervi <
> victorsubervi at gmail.com> wrote:
>
>  Hi;
>> I'm trying to create an HTML <select> with several options in a form that
>> is
>> posted to a script. I want to enable the user to select multiple options.
>> The problem is I don't know how to call those options in my cgi calls in
>> the
>> script to which it posts. Only one of them gets associated with the
>> variable
>> in the <select>. What do?
>> TIA
>> Victor
>>
>
> How are you retrieving the values in the CGI script?
>
> --
> Rami Chowdhury
> "Never attribute to malice that which can be attributed to stupidity" --
> Hanlon's Razor
> 408-597-7068 (US) / 07875-841-046 (UK) / 0189-245544 (BD)
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20091002/99165262/attachment.html>


More information about the Python-list mailing list