Hi,
just replace
// print the option stuff
by
echo "<option value=\"$key\">$value</option>";
Do you have a unique id besides the m??? fields in that table ?
You would need one to use for the select name to identify the row that was used to create the drop down list.
If someone submits the form you would get a post variable like
$_POST['nameofselect'] containing the field that was selected, like e.g. m1
Thomas