Posted by Michael Fesser on 09/16/07 13:34
..oO(RageARC)
>I want to show the user a list of emails and the user must have the
>ability to select which ones he wants. Multiple selections must be
>allowed. Any way I can do this? In PHP I want to do:
>
>foreach ($_POST['contacts'] as $contact) {
>// code...
>}
>
>But using Checkboxes doesn't work, I've tried putting them with the
>same name but all that appears is a string of the LAST selected
>checkbox :S. Help?
Append [] to the names of the checkboxes, e.g.
<input type="checkbox" name="foo[]" value="42">
Then $_POST['foo'] will be an array.
Micha
Navigation:
[Reply to this message]
|