Me back again whit a PHP mySQLi pagination problem... When I rune the script it works fine for first page, but when y click on the link to the second pages te links works but the pagination disappears. so if I have 3 links now I see none. Here's my code.
<?php
include_once ('myConnection.php');
if ( isset( $_GET["get_name"] ) ) {
$las_escuelas = $_GET["get_name"];
} else {
$las_escuelas = 1;
};
$start_from = ( $las_escuelas - 1 ) * 10;
$escuelas = "SELECT *
FROM escuelas
WHERE delegacion = '$delegacion'
AND nivel = '$nivel'
ORDER BY nombre ASC
LIMIT $start_from, 10";
$consulta = mysqli_query( $miguia, $escuelas ) or die ( mysqli_error() );
while ( $fila = mysqli_fetch_array( $consulta ) ) {
echo $fila['name'] . '<br>' . $fila['street'] . ' ' . $fila['numero'] . ' ' . $fila['place'] . ' ' . $fila['phone'] . '<br>';
};
$escuelas = "SELECT COUNT(delegacion)
FROM escuelas
WHERE delegacion = '$delegacion'
AND nivel = '$nivel'";
$consulta = mysqli_query( $miguia, $escuelas );
$fila = mysqli_fetch_row( $consulta );
$registros_total = $fila[0];
$paginas_total = ceil( $registros_total / 10 );
for ( $i = 1; $i <= $paginas_total; $i++ ) {
echo "<a href='resultados1.php?las_escuelas=".$i."'>".$i."</a> ";
};
?>
Thank's :)