Come potrete vedere inn questa pagina recupero la stringa 'vol' per poter fare l'estrazione:
Codice PHP:
<?
                                $db 
mysql_connect($db_host$db_user$db_password);
                                if (
$db == FALSE)
                                    die (
"Errore nella connessione. Verificare i parametri nel file config.inc.php");
                                
mysql_select_db($db_name) or die ("Errore nella selezione del database. Verificare i parametri nel file config.inc.php");
                                
                                
//$vol = $_GET['vol'] = mysql_escape_string($_GET['vol']); 
                                
$vol $_GET['vol'] = (int) $_GET['vol'];
                                
$query "SELECT id_prod,marca,foto,prodotto,descrizione,peso,prezzo,offerta,listino_n FROM prodotti WHERE listino_n='$vol' ORDER BY marca ASC";
                                
                                function 
strSelect$myString$maxLength ) {
                                        
$out "";
                                        
$s explode" ",$myString );
                                        for( 
$i 0$cs count$s ); $i $cs$i++ ) {
                                            
$out .= $s[$i]." ";
                                            if( isSet( 
$s[$i+1] ) && ( strlen$out ) + strlen$s[$i+1] ) ) > $maxLength ) {
                                                break;
                                            }
                                        }
                                       return 
rtrim$out );
                                        }
                                
                                 
$result mysql_query($query) or die(mysql_error());
                                
$num mysql_num_rows($result);
                            switch (
$row[listino_n]) {
                      case 
'1':
                      
$lis "Listino Gatto";
                      break;
                      case 
'2':
                      
$lis "Qualità Gatto";
                      break;
                      case 
'3':
                      
$lis "Diete Gatto";
                      break;
                      case 
'4':
                      
$lis "Accessori Gatto";
                      break;
                      case 
'5':
                      
$lis "Listino Cane";
                      break;
                      case 
'6':
                      
$lis "Accessori Cane";
                      break;
                         default:
                      
$lis "Diete Cane";
                    }
                
?>
                
                <table  border="0" cellpadding="10" cellspacing="0" bgcolor="#009966">
                    <tr>
                      <td height="100%" bgcolor="#009966"><span class="percorso">Percorso: </span><span class="testo">[b][url="./home.php"]Home[/url][/b]</span> <strong class="testo">&gt; Listini[/b] 

                        <font class="style3 style2">Elenco prodotti del listino: </font><font class="titolo">[b]<? echo "$lis?>[/b]</font></td>
In
Codice PHP:
echo "$lis?> 
io devo stampare il testo in base allo switch, ma come mai mi stampa in ogni caso "Diete Cane". Ho controllato la variabile 'vol' viene recuperata nel modo corretto. :master: