i have this code for changing ur gender (if ur a male or female). it changes the value in the database but it doesnt display if ur chosen gender. help pleeze [code] <?php $query = $config->query("SELECT * FROM $table_users WHERE username='$_SESSION[username]'"); $row = mysql_fetch_array($query); $sex = array ( 0 => 'Male', 1 => 'Female', ); echo "<select name='sex'>"; if ( (in_array("$row[sex]", $sex)) ) { $selected = "selected='selected'"; } else { $selected = NULL; } $option = " <option value='$sex[0]' $selected >$sex[0]</option>\n <option value='$sex[1]' $selected >$sex[1]</option>\n"; echo $option; echo "</select>"; ?> [/code]