I wonder if somebody could help me please. I'm displaying results from a database search, but I only want two results per page. I have managed to get it to display on two results, but when I click next or previous the same two results are displayed. To limit the results I've got:
PHP Code:
$sql_order = " ORDER BY date DESC";
$start = (int) $_GET['start'];
$sql_limit = " LIMIT $start,2";
and to navigate through the results I've added:
PHP Code:
<a href='?start=<? $start ?>'>previous</a> <a href='?start=<? $start ?>'>next</a>
to the html of the page. When it goes to the next page the url is the same ,but has ?start= at the end of it
|