Well, you're welcome of course.
It doesn't look too messy, and you get kudos for using your head to figure this one out. That'll make you a more popular poster 'round here in the long run 😉
In your code, you would slightly beautify it if you combined the print statements (lots of 'newbies' don't know you can do this):
print ">$row[MySQLTableColumn]
</OPTION>";
I also mentioned writing a "callback" type function; it's a tad more advanced, but as you seem to be a quick study, I'll give an example (this is for "radio" buttons, but it works with slight modifications for checkboxes, selects, etc.):
<?php
function radiotest2($var, $num) {
if ($var==$num) { echo "checked"; }
return true;
}
?>
<b>Select hours:</b><br>
Zero<input type=radio name=hours value=0 <? radiotest2($basehours,0); ?>><br>
1<input type=radio name=hours value=1 <? radiotest2($basehours,1); ?>><br>
2<input type=radio name=hours value=2 <? radiotest2($basehours,2); ?>><br>
3<input type=radio name=hours value=3 <? radiotest2($basehours,3); ?>><br>
4<input type=radio name=hours value=4 <? radiotest2($basehours,4); ?>><br>
5<input type=radio name=hours value=5 <? radiotest2($basehours,5); ?>><br>
6<input type=radio name=hours value=6 <? radiotest2($basehours,6); ?>><br>
7<input type=radio name=hours value=7 <? radiotest2($basehours,7); ?>><br>
8<input type=radio name=hours value=8 <? radiotest2($basehours,8); ?>
This is from my "work log" system. In my case, $basehours is brought in from the database, but it could easily be from any source (GPC, etc). So, in this radiolist, if the $basehours value is equal to the radio button's value, "checked" magically appears.
Pretty easy stuff once you grok the concept.
Good luck!