[thelist] Strange checkbox issue (PHP / Forms)

Jack Timmons jorachim at gmail.com
Wed Mar 4 07:06:15 CST 2009


On Wed, Mar 4, 2009 at 6:49 AM, Lee Kowalkowski <
lee.kowalkowski at googlemail.com> wrote:

> 2009/3/4 Jack Timmons <jorachim at gmail.com>:
> > Lee:
> >
> > Using the brackets makes PHP store those fields in an array.
>
> Yuck, OK.  The only other thing I can see is:
>

OT, but still helpful:

Using brackets can be extremely helpful, just like in this case of
organizing and grouping information together. I use it for multiple file
uploads often, and have used it for dynamic lists, etc. It helps because you
don't have to create a unique name for each field, so if you add them
dynamically you don't have to come up with an iterator for the names
(helping readability slightly), but also keeping all the fields in one array
in POST so you don't have to either do some looping parser, etc.

-- 
-Jack Timmons
http://www.trotlc.com
Twitter: @jorachim



More information about the thelist mailing list