I have a form with a multi-line select field:
                  <select name="cities" size="5" multiple>
                   <?                                                                  
                                 $sql="select City from table group by City"
;
                                $result = mysql_query($sql) or die($sql . 
mysql_error());
                                while($row=mysql_fetch_object($result)) {
                                        $city = $row->City;
                                        $cityCode = strtolower(eregi_replace(" ","_", 
$city));
                                        $cityName = ucwords(strtolower($city));
                                        echo("<OPTION 
value='$cityCode'>$cityName</OPTION>");
                                }
                        }
                        ?>
                       </SELECT>

and I am trying to read the multiple selections on the process form, but 
only "seeing" the last selected item.
[ sample parameter list based on get method ]
        filename.php?cities=waterford&cities=winton&cities=woodbridge
[snip]
                if($cities) {
                // multiple may be selected -- figure that out later
                        die("multiple cities: $cities");        // results in 
displaying 
'multiple cities: woodbridge'
                }
[snip]

I'm using PHP and MYSQL to hold the results.

Terry


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

Reply via email to