Re: MultiSelect List Box in PHP

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

 



---------[ 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@xxxxxxxxx]
Sent: Sunday, October 31, 2004 3:06 AM
To: Andy B
Subject: Re:  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@xxxxxxxx> wrote:

Hi.

I was just wondering where I can find info on how to use a MultiSelect

List

Box 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

-- 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