Devo visualizzare:
Area - Sottoaera1 - Sottoarea2
Ora vedo:
Area - Sottoaera1
<?
if ($ID1=="") {
$ID1="2";
}
if ($ID=="") {
$ID="1";
}
if ($ID2=="") {
$ID2="1";
}
$query = "SELECT ID_areesx,Titolo_areesx FROM areesx WHERE ID_areesx = $ID1";
$result = mysql_query($query, $db);
while ($rows = mysql_fetch_array($result)) {
echo "[img]images/indice3.gif[/img] ".$rows["Titolo_areesx"]."";
$query2 = "SELECT ID,Titolo,Area,Link,Sottoarea FROM sottoaree WHERE ID = $ID";
$result2 = mysql_query($query2, $db);
while ($rows2 = mysql_fetch_array($result2)) {
echo " [img]images/indice3.gif[/img] ".$rows2["Titolo"]."";
$query3 = "SELECT ID,Titolo,Area,Link,Sottoarea,Sottoarea2 FROM sottoaree3 WHERE Sottoarea2 = $ID2";
$result3 = mysql_query($query3, $db);
while ($rows3 = mysql_fetch_array($result3)) {
echo " [img]images/indice3.gif[/img] ".$rows3["Titolo"]."";
}
}
}
?>
Perchè?