Re: Getting multitple select values on PHP side

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

 



At 5/4/2007 01:56 PM, Skip Evans wrote:
I have a requirement for a select on a form that has to be able to get multiple values in the form processing PHP side.

You just multiple to the <select...> tag to be able to select multiple values, but on the PHP side the $_POST value for the form only has the last one selected.


I believe the common way to accomplish this is to add [] to the form element's name, which persuades PHP into treating it like an array:

        <select name="nation[]" ...>

Regards,

Paul
__________________________

Paul Novitski
Juniper Webcraft Ltd.
http://juniperwebcraft.com
--
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