Jump to content

[SOLVED] pagination help


Codexxx

Recommended Posts

I have made my own pagination script which would work fine however i have an issue trying to get the current page for example:

 

Usually someone would just do $_Get['page'].. however im doing it within my forums which the url is

 

/index.php?module=forum&process=threadview&id=3&page=3

 

(the page=3 at the end is the page 3 of comments)

 

i somehow need to get the 3 at the end.. $_get['page'] just doesnt work.

 

is there another way to get '3', maybe cutting the url some how..

 

Any help appreciated

Link to comment
https://forums.phpfreaks.com/topic/122983-solved-pagination-help/
Share on other sites

$_GET['page'] IS set, as you can see from that output. It is a bug elsewhere in your code, post it here and we will try to help track down the bug if we can. If you prefer to fix it yourself, track the $currentpage variable you set the page to throughout your script and look for any problems.

ye found,

 

thanks for that generic, great help :)

 

hmm coz i was setting it in

 

$page = $_GET['process']; at the top of my script

and i was setting the get page in..

 

elseif ($page == 'threadview') {

$currentpage = $_GET['page'];

 

 

 

which it obviously didnt like.. so i moved to the top and worked fine...

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.