How do I do this? I want my user to be able to pick several things on a multipick list with either shift or control/click etc and then submit them. How do I get the information?
If the field name is 'listone' then if they only pick one item then that variable would be $listone but how about when they pick several items on the list?
Submitting data from a multipick list form field
Moderator: General Moderators
-
Matt Phelps
- Forum Commoner
- Posts: 82
- Joined: Fri Jun 14, 2002 2:05 pm
one way is:
Then when trying to find out what fields were selected use:
Code: Select all
<SELECT NAME='testfieldї]' size='8' multiple>
<OPTION value='1'>1
<OPTION value='2'>2
<OPTION value='3'>3
<OPTION value='4'>4
</SELECT>Code: Select all
<?php
foreach ($HTTP_GET_VARSї"testfield"] as $testfield) {
echo "$testfield<br>";
}
?>