ok here is my problem. I have a select list in a form that a user can select multiple items from. This list is generated from a database.
<select name="type" class="formfields-select" id="JobType">
<option value='' selected="selected">Select</option>
<option value=''>------</option>
<?PHP
$connection=mysql_connect ("localhost", "foo", "bar") or die ("I cannot connect to the database.");
$db=mysql_select_db ("foorbar", $connection) or die (mysql_error());
$query = "SELECT type FROM typelist ORDER BY type ASC";
$sql_result = mysql_query($query, $connection) or die (mysql_error());
while ($row = mysql_fetch_array($sql_result)) {
$type = $row["type"];
echo "<option value = '$type'>$type</option>";
}
?>
</select>
When the form is submitted only one selection is saved to the database and echoed to the page.
I need all of them to be saved and echoed.
I'm kind of new at this, if you can't tell from my post and any suggestions would be appreciated.