//use this while you are looping throw the row. <option value="myValue"<?=$row['value'] == 'myValue' ? ' selected="selected"' : ''?>>myValue</option>