This is a new post and has nothing to do with the bottom replies... I am trying to do Paging and need some help...
I got this code online, but I dont remember what site it was from...
Here's what part of the code looks like:
Code: Select all
PHP: Pager.php
function nextPrev($curpage, $pages)
{
$next_prev = "";
if (($curpage-1) <= 0)
{
$next_prev .= "Previous";
}
else
{
$next_prev .= "<a href="".$_SERVERї'PHP_SELF']."?page=".($curpage-1)."">Previous</a>";
}
$next_prev .= " | ";
if (($curpage+1) > $pages)
{
$next_prev .= "Next";
}
else
{
$next_prev .= "<a href="".$_SERVERї'PHP_SELF']."?page=".($curpage+1)."">Next</a>";
}
return $next_prev;
}Code: Select all
PHP: listBooks.php
$next_prev = $p->nextPrev($_GETї'page'], $pages);
echo $next_prev;Any ideas y it does that???
Thanks for all your help..