this is the php script of the form script of list menu <? include "./connect.php"; echo "<label>"; ?> <select name="origin_city" size="10" multiple="multiple" id="origin_city"> <? $connect = mysql_pconnect($dbhost,$dbusername,$dbuserpassword); $query = "SELECT * from cities where StateID='$service'"; $result = mysql_db_query($dbname,$query); while($row = mysql_fetch_array($result)) { echo "<option value = ". $row["CityID"] . ">" . $row["city"] . "</option>"; } echo "</select>"; echo "</label>"; ?> ---------------------------------- Question : How do i get the data if the user select multiple. I want the display like this for example 1,4,8,9
<select name="origin_city[]" ... Code (markup): $_POST['origin_city'] will be an array of the values of selected items.