Previous & next navigation over results, problem.
Posted: Mon Mar 24, 2003 6:51 pm
I have a query limited to 10, and I'm using this href to send to the page again the variables in order to reload in the next ten results.
After this, this formula has to grab it and serve it as I want, but the fact is that it only does it once, in the second time, the variables are empty.
What happens??
Code: Select all
<?php
if ( $coincidencias >= 11){
echo "<a href='";
echo "resultados2.html?incremento=10&envio1=";
echo $_POST['envio1'];
echo '&envio2=';
echo $_POST['envio2'];
echo '&envio3=';
echo $_POST['envio3'];
echo '&envio4=';
echo $_POST['envio4'];
echo '&envio5=';
echo $_POST['envio5'];
echo '&envio6=';
echo $_POST['envio6'];
echo '&herencia=';
echo $aumento;
echo "'>10 resultados siguientes>></a>";
} else { echo '<font face=Verdana, Arial, Helvetica, sans-serif><b><font size=1 color=#999999>10
resultados siguientes>></font></b>';
}
?>Code: Select all
<?php
$herencia = (!empty($_GET['herencia']) && is_numeric($_GET['herencia'])) ? $_GET['herencia'] : 0;
$incremento = (!empty($_GET['incremento'])) ? $_GET['incremento'] : 0;
$aumento = $herencia + $incremento;
if ($aumento < 0)
$aumento = 0;
$query = 'SELECT * ' . $query . ' LIMIT ' . $aumento . ', 10';
?>