I'm trying to implement paginaton on the article archive but I can't seem to get
$_SERVER['PHP_SELF']
to return the page that I need - I sort of know why but can't seem to solve the problem.
The archive page is located at http://localhost/cms/index.php?action=archive and so when I use PHP_SELF it returns the homepage.
I first get the current page with:
if (isset($_GET['currentpage']) && is_numeric($_GET['currentpage'])) {
$currentpage = (int) $_GET['currentpage'];
} else {
$currentpage = 1;
}
Then I try to create a link to the next page with
echo " <a href=action='{$_SERVER['PHP_SELF']}?currentpage=$nextpage'>></a> ";
but this just returns the homepage.
Any help or ideas on this issue would be great.
Thanks.