How can I send value by pagination link in codeigniter? If a category value equl 3 when I press any pagination link send 3 to the goal page.
for example like this : $cate=3;
<a href ="goalpage.php?cate=$cate> linktext </a>
Configure Codeigniter
pagination's
setting like below:
$this->load->library('pagination');
$this->pagination->page_query_string = FALSE;
$this->pagination->query_string_segment = 'cate';
......
$this->pagination->create_links(...parameters of yours...);
After you set these two preferences the logic in Pagination
class method create_link
will get cate from $_GET
and set it as Pagination::cur_page
value and make the correct link to your goal page.
I just describe how to make Codeigniter's Pagination lib
receive current page from your http query string
, and the other work are associated to your program's specific occasion.