echo "Municipios de ".$comunidad; ?>
" ?>
$pro = $_GET['pro'];
////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////
mysqli_report(MYSQLI_REPORT_ERROR | MYSQLI_REPORT_STRICT);
$mysqli2 = mysqli_connect("localhost","u819257692_spainviajes","33.Spa33spa33", "u819257692_spainviajes");
mysqli_set_charset($mysqli2, 'utf8mb4');
//////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////
$sql33 = "SELECT * FROM comunidad WHERE comunidad2='$pro'";
$tabla33 = mysql_query($sql33) or die(mysql_error());
while ($row33=mysql_fetch_array($tabla33))
{
$x++;
$mun77 = $row33['mun']; $ext77 = $row33['st']; $zzzzz = $row33['z'];
$comunidad = $row33['comunidad']; $comunidad2 = $row33['comunidad2'];
}
mysql_free_result($tabla33);
$sql = "SELECT * FROM todomunicipios WHERE comunidad2='$pro'";
$tabla = mysql_query($sql) or die(mysql_error());
while ($row=mysql_fetch_array($tabla))
{
$x++;
$nombre[$x] = $row['municipio']." (".$row['provincia'].")";
$ligero[$x] = $row['ligero'];
$provincia = $row['provincia'];
}
mysql_free_result($tabla);
$sql2 = "SELECT * FROM todomunicipios WHERE comunidad2='$pro' ORDER BY hab DESC";
$tabla2 = mysql_query($sql2) or die(mysql_error());
while ($row2=mysql_fetch_array($tabla2))
{
$x2++;
$nombre2[$x2] = $row2['municipio']." (".$row2['provincia'].")";
$habitantes = $row2['habitantes'];
$z = $row2['z'];
$bbb2 = $bbb2."".$habitantes.",";
if($x2==20){break;}
}
mysql_free_result($tabla2);
$bbb2 = $bbb2."***";
$bbb2 = str_replace(",***","",$bbb2);
while($h<$x2){$h++;
$toca2 = $nombre2[$h];
$aaa2 = $aaa2.', "'.$toca2.'"';
}
$aaa2 = "***".$aaa2;
$aaa2 = str_replace("***, ","",$aaa2);
$xxxxx2aj = mysql_query("SELECT DISTINCT comunidad2,ok,texto,nombre,provincia,comunidad FROM lomas WHERE comunidad2='$pro' AND ok='2' AND texto NOT LIKE '%segundo%'
AND texto NOT LIKE '%tercer%' ORDER BY texto ASC") or die(mysql_error());
while($xxxxx2j = mysql_fetch_array($xxxxx2aj))
{
$zzzzzxj++;
$zzzzz22j = $zzzzz22j."".$xxxxx2j['nombre']." (".$xxxxx2j['provincia']." , ".$xxxxx2j['comunidad'].") ".utf8_decode($xxxxx2j['texto'])." ".$xxxxx2j['comunidad']."
";
}
mysql_free_result($xxxxx2aj);
$sql3 = "SELECT * FROM todomunicipios WHERE comunidad2='$pro' ORDER BY zzy DESC";
$tabla3 = mysql_query($sql3) or die(mysql_error());
while ($row3=mysql_fetch_array($tabla3))
{
$x3++;
$nombre3[$x3] = $row3['municipio']." (".$row3['provincia'].")";
$z = $row3['zzy'];
$bbb3 = $bbb3."".$z.",";
if($x3==20){break;}
}
mysql_free_result($tabla3);
$bbb3 = $bbb3."***";
$bbb3 = str_replace(",***","",$bbb3);
while($h2<$x3){$h2++;
$toca3 = $nombre3[$h2];
$aaa3 = $aaa3.', "'.$toca3.'"';
}
$aaa3 = "***".$aaa3;
$aaa3 = str_replace("***, ","",$aaa3);
$sql3x = "SELECT * FROM todomunicipios WHERE comunidad2='$pro' ORDER BY superficie DESC";
$tabla3x = mysql_query($sql3x) or die(mysql_error());
while ($row3x=mysql_fetch_array($tabla3x))
{
$x3x++;
$nombre3[$x3x] = $row3x['municipio']." (".$row3x['provincia'].")";
$zx = $row3x['superficie'];
$bbb3x = $bbb3x."".$zx.",";
if($x3x==20){break;}
}
mysql_free_result($tabla3x);
$bbb3x = $bbb3x."***";
$bbb3x = str_replace(",***","",$bbb3x);
while($h2x<$x3x){$h2x++;
$toca3x = $nombre3[$h2x];
$aaa3x = $aaa3x.', "'.$toca3x.'"';
}
$aaa3x = "***".$aaa3x;
$aaa3x = str_replace("***, ","",$aaa3x);
?>