I have a drop down list which contains username which is fetch from a table. What I want is to have a some sort of default selected value depends on the current username that is login. For example Jamie logins then the drop down list will automatically contain a default selected value "Jamie" so that the user will not select anymore from the drop down list. Any idea on how can this be done? Sample code is much appreciated. Thanks
assuming $SESSION['uname'] == 'Jamie'
echo '<select>'; for () { echo '<option' . ($_SESSION['uname'] == $textvar ? ' selected="selected" : '') . ' value=...' }