Welcome Guest, Not a member yet? Register   Sign In
Pagination using multiple searcing criteria in codeigniter
#1

[eluser]adi sembiring[/eluser]
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

Code:
<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.

Code:
id    name    address.

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

Code:
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

Code:
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

Code:
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 ?
#2

[eluser]adi sembiring[/eluser]
somebody help me please ...




Theme © iAndrew 2016 - Forum software by © MyBB