purtroppo non fa al caso mio, io dovrei far visualizzare un'immagine in base al sesso dell'utente, prima avevo fatto un esempio semplice per farmi capire:
Codice PHP:
echo "<tr>
<td height=\"41\" width=\"113\"><span class=\"testo_grigio_bold\">email</span></td>
<td align=\"right\" width=\"162\"><span class=\"testo_grigio_bold\">$row1->email</span></td>
<td width=\"100\"></td>
<td align=\"left\" width=\"113\"><span class=\"testo_grigio_bold\">sesso</span></td>
<td align=\"right\" width=\"162\">\n";
if ($row1['sesso']==1){
echo "<img src=\"../images/menu_spunta_rosa.gif\" width=\"10\" height=\"10\">\n";
}
else
{
echo "<img src=\"../images/menu_spunta_blu.gif\" width=\"10\" height=\"10\">\n";
}
echo "</td>
</tr>
<tr>
<td height=\"1\" colspan=\"5\" valign=\"top\" bgcolor=\"BF9BB5\"></td>
</tr>\n";
e poi a monte ho ricontrollato tutto, ed è tutto corretto. 
il codice esteso è:
Codice PHP:
<form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="get">
<table width="650" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="650" valign="top">
<select name="utente" onchange="this.form.submit()">
<option value="">seleziona utente</option>
<?php
//compila dinamicamente la select
while($row = mysql_fetch_object($sql2)) {
if ($row->id_utenti==$_GET[utente]){ $sel="SELECTED";}ELSE{$sel="";}
echo "<option value=\"$row->id_utenti\" $sel>$row->cognome</option>\n";
}
echo "</select>\n";
//verifica se è stato passato o meno un valore dalla select
if(isset($_GET['utente'])) {
//memorizza il valore passato dalla select (l'id del utente)
$IDutente = $_GET['utente'];
//recupera il nome del allievo scelto tramite $IDutente
$utente = mysql_query("SELECT * FROM a_utenti
WHERE id_utenti = '$IDutente") or die(mysql_error());
//recupera tutti i dati relativi all'utente specifico tramite $IDutente
$sql2 = mysql_query("SELECT * FROM a_utenti
WHERE id_utenti = '$IDutente'") or die(mysql_error());
//verifica che ci sia almeno un risultato valido per la query precedente
if(mysql_num_rows($sql2) >= 1) {
//stampa i dati relativi all'utente
$row1 = mysql_fetch_object($utente);
echo "<table width=\"650\" border=\"0\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\">
<tr><td height=\"12\" colspan=\"5\"></td></tr>
<tr><td height=\"20\" colspan=\"5\"><span class=\"testo_viola_bold\">Dati dell'utente</span></td></tr>
<tr><td height=\"1\" bgcolor=\"BF9BB5\" colspan=\"5\"></td></tr>\n";
echo "<tr>
<td height=\"41\" width=\"113\"><span class=\"testo_grigio_bold\">email</span></td>
<td align=\"right\" width=\"162\"><span class=\"testo_grigio_bold\">$row1->email</span></td>
<td width=\"100\"></td>
<td align=\"left\" width=\"113\"><span class=\"testo_grigio_bold\">sesso</span></td>
<td align=\"right\" width=\"162\">\n";
if ($row1['sesso']==1){
echo "<img src=\"../images/menu_spunta_rosa.gif\" width=\"10\" height=\"10\">\n";
}
else
{
echo "<img src=\"../images/menu_spunta_verde.gif\" width=\"10\" height=\"10\">\n";
}
echo "</td>
</tr>
<tr>
<td height=\"1\" colspan=\"5\" valign=\"top\" bgcolor=\"BF9BB5\"></td>
</tr>\n";
echo "</table>\n";
} else {
echo '<span class="testo_viola_bold">non ci sono dati dell'utente</span>';
}
}
?>
</td>
</tr>
</table>
</form>