Re: Re: Variable name as a string

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

 



First, the type is checkbox, not check.  Second, you cannot put a value
in the brackets  for a checkbox group.  A checkbox group is passed to
PHP automatically as an array.

Thank you,
Micah Gersten
onShore Networks
Internal Developer
http://www.onshore.com



Maciek Sokolewicz wrote:
> Well, this seems easier/cleaner to me:
>
> <input type="check" name="my_checkboxes[1]" value="1" /> 1<br />
> <input type="check" name="my_checkboxes[2]" value="1" /> 1<br />
> <input type="check" name="my_checkboxes[3]" value="1" /> 1<br />
> <input type="check" name="my_checkboxes[4]" value="1" /> 1<br />
>
> $my_checked_checkboxes = $_REQUEST['my_checkboxes'];    // whichever
> you wish, $_GET or $_POST, I don't care right now; you choose.
>

-- 
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