Jump to content

Pagination using multiple searcing criteria in codeigniter


gun41exe

Recommended Posts

Hi ..., Im trying to implement pagination using multiple searching criteria.

Supposed I Have student table. I also use pagination when the list of student displayed.

The pagination link is. `site_url . '/student/page/';` so I use `$config['uri_segment'] = 1`;

so the pagination link will be

 

   

<a href="http://mysite/index.php/student/page/0">1</a>
    <a href="http://mysite/index.php/student/page/1">2</a>

 

and son.

 

 

After that I wanna search student data using 3 searching criteria implemented using textfield.

 

 

 id	name	address.

 

user can search by id or name or address or combination of the three criteria.

the url become

 

   

http://mysite/index.php/student/page/0
    href=http://mysite/index.php/student/page/1

 

and son.

 

but  I use get method for searching.  and while trying to search using the search criteria field the url become

 

 

 href="http://mysite/index.php/student/page/1?id=1&name=a&address=b

 

the problem occurred when I try create pagination based on criteria. because the pagination link have contain query string

i don't know how to create become

 

   

href="http://mysite/index.php/student/page/0?id=1&name=a&address=b
    href="http://mysite/index.php/student/page/1?id=1&name=a&address=b

 

or do you have a best practice to solve this problem ?

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.