Código PHP:
include "../includes/config.php";
mysql_connect($server, $db_user, $db_pass) or die (mysql_error());
$result = mysql_db_query($database, "select * from $table WHERE username = '$username'") or die (mysql_error());
<select name=" " onChange="showimage()">
while($qry = mysql_fetch_array($result)){
<option value="$qry[name1]">$qry[name1]</option>
}
</select>