Just don't make the object and scan the block yourself:
decode-cgi "foo=10&foo=20"
== [foo: "10" foo: "20"] ; your data is intact
parse decode-cgi "foo=10&foo=20" [
        some [
                copy wrd set-word! copy value string!
                (print ["Name:" wrd "Value:" value])
        ]
]

So instead of printing them out you can do something with the values
you get for each word.  The suggestion to use make object! with
decode-cgi just makes handling most data very easy. In the less
frequent cases you may have to do a little work yourself.  Sorry.

Sterling

> Hi, just wondering how you deal with checkboxes when doing CGI.
> 
> if you do something like:
> 
> cgi-data: make object! decode-cgi system/options/cgi/query-string
> 
> you lose multiple values with the same name, like you'd have in the case of
> multiple selected checkboxes. I couldn't find anything about it in Rebol:
> The Official Guide. I did a search in all the code on the book's CD and
> found something that can aid you in generating the HTML for form elements,
> but nothing that lets you read them. Also, the example in Rebol's howto uses
> a checkbox, but only one! :) Anyone have any solutions? Thanks!
> 
> Keith
> 
> 

Reply via email to