------------------------------------------------ On Thu, 10 Jul 2003 11:39:23 -0800, "Dennis Stout" <[EMAIL PROTECTED]> wrote:
> Beginners-CGI; > > If I have a form with a lot of values (such as Tech ID, Tech Name, Tech > Queues..) and one of the fields is a select multiple, with a varied amount of > options selected, how are those values sent to the cgi script? > > Is it something like ?queue=lvl1,lvl2,admin,sysad&foo=bar or what? > Because there is no way to create a delimiter that the potential data doesn't contain, the browser doesn't have the option to choose an arbitrary delimiter like a comma, or the like. So (though I can't speak for all browsers most will do the same) each value is passed with the same key, so your string ends up like: ?queue=lvl1&queue=lvl2&queue=admin&queue=sysad&foo=bar This punts the problem to the server side (or whatever does the query string parsing) so there are multiple ways to handle it, build a complex data structure that stores an array reference for any multi-valued keys, store the keys with some known delimiter (aka cgi-lib.pl used to use the null character \0). So it depends on your request parser, some provide multiple manners (I think the standard CGI does). Have a look at the respective docs for how your parser handles it, unless you are writing a parser...but then why do that with so many good freely available ones? http://danconia.org -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]