On Tue, May 10, 2011 at 11:59 AM, Alexey Pechnikov
<[email protected]>wrote:

> 2011/5/10 Dave Bauer <[email protected]>:
> > I am not sure I understand hat you are trying to accomplish. What is an
> HTTP
> > Form Array? I am not aware of such a thing. It looks like you are passing
> > some application specific formatted data and need to process it.
>
> This is very popular situation! The HTML example with checkboxes array:
>
> <form method=post action=''>";
> <input type=checkbox name=box value='John'>
> <input type=checkbox name=box value='Mike'>
> <input type=checkbox name=box value='Rone'>
>
> Param "box" is array.
>
> As example, a simple HTTP GET request:
> /?a=first&a=second&b=1&b=2
>
> In this request we can see 2 two-elements arrays:
> a=first, a=second
> b=1, b=2
>
> or 2 rows:
> a=first, b=1
> a=second, b=2
>
> Problems:
>
> 1. When names and number of the array elements are not known we can't
> use ns_querygetall
>
> 2. When some items can be not defined is needed the additional check
> of arrays elements count. As example
> /?a=first&a=second&b=1&a=third&b=3
> But
> [ns_querygetall a] {first second third}
> [ns_querygetall b] {1 3}
>
> Of course, these are _not_ the 3 rows becouse value [lindex
> [ns_querygetall b] 2] = "" is invalid!
>
>
 In general since you want to do additional input checking, and the input
checking may be application specific AOLserver doesn't support this. I doubt
anyone is going to implement this at the AOLserver level.

OpenACS supports parsing the input in this way as well as input validation
and error checking, as one example that I am familiar with. I am sure there
is other Tcl code that exists to do this.

Dave

Best regards, Alexey Pechnikov.
> http://pechnikov.tel/
>
>
> --
> AOLserver - http://www.aolserver.com/
>
> To Remove yourself from this list, simply send an email to <
> [email protected]> with the
> body of "SIGNOFF AOLSERVER" in the email message. You can leave the
> Subject: field of your email blank.
>



-- 
Dave Bauer
[email protected]
http://www.solutiongrove.com


--
AOLserver - http://www.aolserver.com/

To Remove yourself from this list, simply send an email to 
<[email protected]> with the
body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: 
field of your email blank.

Reply via email to