Welcome Guest, Not a member yet? Register   Sign In
pagination didn't work

Can you re-post your controller code?

function index(){
    $config['base_url'] = base_url().'furoms/';
    $config['per_page'] = '5';
    $config['uri_segment'] = 3;
    $config['total_rows'] = $this->db->count_all('forum_topic'); // 9 records result
    $config['open_tag'] = '<p>';
    $config['close_tag'] = '</p>';
    $furomcontent['data'] = $this->furom->furomcontent($config['per_page'], $config['uri_segment']);

Change the

1. test if any of the URLs return anything:


2. You need to check if your index() function is being called when you try the above URLs. Put a print statement inside the index function to confirm.

3. Post the results of the tests 1 and 2.

ok, i confirmed that the index() function was being called when i try this urls <yoursite>/index.php/furom/index/4, <yoursite>/index.php/furom/index/2, and <yoursite>/index.php/furom/index/ because i print a test in the index() function then the test appears for those urls, but the page was not found if i used this <yoursite>/index.php/furom/2

On any pages except the first page, you don't see the pagination bar or the db rows? Could you post your view code?

in my view
&lt;?php echo $this->pagination->create_links(); ?&gt;

pagination like this
1 2 3 4 > Last ›

But do you see it displayed on the pages:


no changes in these urls <yoursite>/index.php/furom/index/2, <yoursite>/index.php/furom/index/4 same as <yoursite>/index.php/furom output

What do you mean by no change? do you see the same records on /index/2 or /index/4 pages or you see nothing on any page? Could you explain the output of the pages a bit more?

i mean the out put of /index/2 and /index/4 is the same records of /index.php/furom

Theme © iAndrew 2016 - Forum software by © MyBB