Re: Re: order of elements in $_POST super global

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



name="bool[0][careers]"

might do what you want...

it's really quite difficult to say without a concrete example...

On Thu, June 8, 2006 10:20 am, Ben Liu wrote:
> I probably should add some more details to my question:
>
> The names of the form checkboxes could be changed from ie:
> bool_careers, bool_speaking, bool_internship, etc. to a single array
> bool_questions[], for instance. The problem with that is that I am
> using the form checkbox names later to process related data.
> Specifically, I am building a user-input based query. So if the form
> checkbox names are the same as the names of the variables in the
> database, it makes for easy creating of the query, since the names
> become associative keys in the $_POST array. I iterate through the
> $_POST array, checking each for true/false state. If the checkbox is
> checked, I add the associative key name to the query. Eliminating the
> checkbox names in favor of a numerical key only would make this more
> complicated.
>
> - Ben
>
> On 6/8/06, Barry <barry@xxxxxxxxxxxxxx> wrote:
>
>> 1. Use Keys in your form like a[1],a[2]
>> 2. order the array by usort (alphabetically or whatever u prefer)
>>
>> that way => 2: yes it is.
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


-- 
Like Music?
http://l-i-e.com/artists.htm

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux