Este es el codigo de MENULATERA.PHP
Código PHP:
Ver original<?php
{
}
?>
<head>
<?php
if(isset($_GET["selciudad"])){ $_SESSION["Ciudad"]=$_GET["selciudad"];
}
$selciudad = $_SESSION["Ciudad"];
?>
</head>
<body>
<form name="filtrar" id="filtrar" method="GET" action="">
<div id="accordion">
<table width="185" height="30" border="0" cellspacing="5">
<tr>
<td align="left">
<select name="selciudad" id="selciudad" class="Guias3" onChange="cargarContenido('Contenido.php')">
<option value="Todas las ciudades" selected> Todas las ciudades</option>
<option value="<?php echo $_SESSION["Ciudad"]; ?>" selected> <?php echo $_SESSION["Ciudad"]; ?></option>
<?php
$tablaciudad = mysql_query("SELECT * FROM provincias ORDER BY Provincia ASC"); if (empty($_GET["selciudad"])<> '-1') {
echo "<option value='".$registrociudad['Provincia']."' selected> ".$registrociudad['Provincia']."</option>";
}else{
echo "<option value='".$registrociudad['Provincia']."' > ".$registrociudad['Provincia']."</option>"; }
?>
</select>
</td>
</tr>
</table>
</form>
</div>
</body>
este el ultimo el de CONTENIDO.PHP
Código PHP:
Ver original<?php
{
}
?>
<?php require_once('Connections/ConexionCoches.php');?>
<?php
if(isset($_GET["selregistrospagina"])){ $_SESSION["numpag"]=$_GET["selregistrospagina"];
}
$selregistrospagina=$_SESSION["numpag"];
if(isset($_GET["selciudad"])){ $_SESSION["Ciudad"]=$_GET["selciudad"];
}
$selciudad=$_SESSION["Ciudad"];
echo $_SESSION["Ciudad"];
?>
<head>
<meta http-equiv="content-type" content="text/html;charset=UTF-8">
<link rel="stylesheet" href="Css/zebra_pagination.css" type="text/css">
<link rel="stylesheet" href="Css/Coches.css" type="text/css">
<link rel="stylesheet" href="Css/ClassCoches.css" type="text/css">
</head>
<?php
$records_per_page = $selregistrospagina;
require 'Zebra_Pagination/Zebra_Pagination.php';
$pagination = new Zebra_Pagination();
$pagination->records_per_page($records_per_page);
?>
<body>
<div id="Consulta">
<?php
$sql = "SELECT SQL_CALC_FOUND_ROWS * FROM coches WHERE Activacion = '1'";
if ($_SESSION["Ciudad"] <>'Todas las ciudades') {
$sql .= "AND coches.Ciudad = '$selciudad' ";
}else {$sql .= "AND coches.Ciudad <> 'Todas las ciudades' ";
}
$sql .= 'ORDER BY Ciudad ASC ';
$sql .= 'LIMIT ' . (($pagination->get_page()- 1) * $records_per_page) . ', ' . $records_per_page . '';
$pagination->records($rows['rows']);
$pagination->records_per_page($records_per_page);
?>
<div class="Prueba">
<table class="MarcoFotoPrincipal" width="183" border="0">
<tr>
<td><a href="Ficha.php?Id=<?php echo $registro['Id']; ?>"><img border="0" src="<?php echo $registro['FotoPrincipal']; ?>" width="165px" height="240px"></a></td>
</tr>
</table>
</div>
<?php
}
?>
</div>
<?php
$pagination->render();
?>
<?php
echo "Página: ";
echo "<a class=\"Paginacion\">".$pagination->get_page()."</a>";
echo " de ";
echo "<a class=\"Paginacion\">".$pagination->_total_pages ."</a>";
?>
<?php
echo "Coches: ";
echo "<a class=\"Paginacion\">".$rows['rows'] ."</a>";
?>
</body>
Ahora si podeis ayudarme, Gracias a todos.