Re: MultiSelect List Box in PHP
| From: | M. Sokolewicz | Date: | Sun, 31 Oct 2004 09:00:11 +0000 |
| Subject: | Re: MultiSelect List Box in PHP | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-200753@lists.php.net to get a copy of this message | ||
---------[ input.html ]----------
<html>
....
<form action="input.php" method="post">
<select name="select[]" multiple>
<option value="1">one</option>
<option value="2">two</option>
<option value="3">three</option>
</select>
<input type="submit" value="submit" name="submit">
</form>
....
</html>
---------[ ]-------------------[ input.php ]---------- <?php print_r($_POST); ?>
---------[ ]-------------------[ output ]---------- Array (
[select] => Array
(
[0] => 1
[1] => 2
)
[submit] => submit)
---------[ ]----------Above output is with #1 and #2 selected, and #3 not selected. Easy, huh? - Tul Andy B wrote:
Sorry that doesn't do me a huge bit of good since I have no clue how to write java in the first place. Does anybody know where I can find or get an example of php code that shows how to get all the selected items from a multiselect listbox and loop through them printing them on the screen?? -----Original Message----- From: Eric Lee [mailto:pgeric@gmail.com] Sent: Sunday, October 31, 2004 3:06 AM To: Andy B Subject: Re: [PHP] MultiSelect List Box in PHP it's just likes you used in normal html & javascript, but the code that generated to control the ui are now moved to server-sided. :) On Sun, 31 Oct 2004 01:33:13 -0500, Andy B <aborka1@wmis.net> wrote:Hi. I was just wondering where I can find info on how to use a MultiSelectListBox with PHP? I need to use it with MYSQL 5.0.0, PHP 4.3.9, and windows XP sp2. Any help/leads would be greatly appreciated. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php-- Eric Lee