RE: [PHP] Drop Down Box Question
| From: | John Holmes | Date: | Sun, 21 Jul 2002 17:18:20 +0000 |
| Subject: | RE: [PHP] Drop Down Box Question | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-108732@lists.php.net to get a copy of this message | ||
> Hello,
> Is there a way to handle data gathered from a drop down menu that
allows
> multiple selections using PHP?
Of course. Name your select box as an array, and include the 'multiple'
keyword.
<select name='something[]' multiple>
Then you'll have an array on your processing page that holds all of the
values that were selected. $_POST['something'][]. Note that it starts at
zero.
You can use count($_POST['something']) to see how many were selected,
etc...
---John Holmes...