I use GET for pagination, ?page=1 is page one and so on.
The problem is, is that I would like to sort the data and using GET is the better way of doing it, as so:
?page=1&sort=date
If I try that and click page 2, it will go to ?page=2 and loose the sorting.
I have also tried $_SERVER['QUERY_STRING'] but I just end up with an accumulation of ?page=# in the address bar when going from page to page.
Here is how my pagination links are generated:
<a href='{$_SERVER['PHP_SELF']}?page=$nextpage'>Next</a>
How would I go about doing this?
You could do something along the lines of: