what you do is get the value out of the db and store it as $inout for example
then when writing the html code
<select value=OUT <?if($inout == "OUT"){echo "selected";} ?> >OUT</select>
<select value=IN <?if($inout == "IN"){echo "selected";} ?> >IN</select>
Hope this is what you meant
Al