OK, I guess you've read the warning under my signature now 😉
Anyway. I have two pages. On page1.php I have a form with a multiple dropdown. The code snippet for it is:
<?
$co_data = $db->get_row("SELECT * FROM table1 WHERE id = $id");
$country = $table1->co_country;
$country = str_replace("_", " ", $country);
?>
// This is not in the code, just an explanation
// echo "$table1->co_country"; will return my db value
<select name="co_country[]" multiple>
<?
$checked_locs = "$table1->co_country";
$checked_locs = explode(", ", $checked_locs);
?>
<option value="<? echo "$table1->co_country"; ?>"<?
if (in_array("$table1->co_country", $checked_locs))
echo " selected>".$country; ?>
<option value="Argentina">Argentina
<option value="Australia">Australia
...
<option value="Other">Other
</select>
When I POST the form it hits page2.php that has the following code:
$co_country = @implode(", ", $co_country);
$db->query("UPDATE co_data SET co_country='$co_country' WHERE co_id = $co_id");
Now, here's what's happening:
on page1.php I do not get values returned and highlighted
on page2.php everything seem to work OK except it adds options from dropdown on page1.php everytime I submit the form...
I sure hope this clears it a bit.