ciao a tutti,
ho un piccolo problema che non riesco proprio a risolvere: in pratica ho uno script che non esegue il codice di un else e non capisco il perchè. Tutte le parentesi sembrano chiuse.
Posto tutto il codice:
Codice PHP:
if ($result=mysql_query("SELECT * From applicazioni order by nome_applicazione;")) {
                         while    (
$row=mysql_fetch_array($result)) {
                          
$app=$row['nome_applicazione'];
                          echo 
"<tr><td>".$row['nome_applicazione']."</td>";
                        while (
$rowappmysql_fetch_array($resultapp)) {
                              if (
$rowapp['applicazione']==$app)
                                 {
                                    if (
$result2=mysql_query("SELECT * From gruppo Where applicaz='$app';")) {
                                             echo 
"<td><select name='gruppo".$row['id_appl']."'>";
                                          echo 
"<option value=''>Non Ammesso</option>";
                                             while (
$row2=mysql_fetch_array($result2)) {
                                              
$idgroup=$row2['id_group'];
                                                
$group=$row2['nome_group'];
                                              if (
$rowapp['gruppo']==$group)
                                                     echo 
"<option value='".$idgroup."' SELECTED>$group</option>";
                                                else      
                                                       echo 
"<option value='".$idgroup."'>$group</option>";
                                          }
                                    echo 
"</select></td></tr>";
                                    }
                               } 
                               else         
//NON ENTRA QUI
                               
{    
                                       echo 
"qui";                      
                                  
//per questa applicazione non ci sono gruppi selezionati
                                   
if ($result2=mysql_query("SELECT * From gruppo Where applicaz='$app';")) {
                                             echo 
"<td><select name='gruppo".$row['id_appl']."'>";
                                          echo 
"<option value='' selected>Non Ammesso</option>";
                                             while (
$row2=mysql_fetch_array($result2)) {
                                              
$idgroup=$row2['id_group'];
                                                
$group=$row2['nome_group'];
                                              echo 
"<option value='".$idgroup."'>$group</option>";
                                          }
                                    echo 
"</select></td></tr>";
                                       }
                               }   
                              }
                           }
                        } 
l'else è lunico che c'è..

grazie in anticipo