On Sun, Jul 21, 2002 at 11:43:25AM -0400, WANDA HANSEN wrote:
> Is there a way to handle data gathered from a drop down menu that
> allows multiple selections using PHP?

Yes.  The way I normally do this is to use HTML that looks something
like:

<select multiple='multiple' name='test[]'>
<option value='1'>Red</option>
<option value='2'>Green</option>
<option value='3'>Blue</option>
</select>

Now in your PHP program, you can access them all with something like:

<?php
foreach($_POST['test'] as $test) {
   echo "You selected $test<br />\n";
}
?>

-- 
Jason Stechschulte
[EMAIL PROTECTED]
http://www.ypisco.com
--
History books which contain no lies are extremely dull.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to