1

i am using query string to search in codeigniter. my url is like

http:// localhost/testing/main?serch=res

but my paging is like

http: //localhost/testing/main/10

now i want to attach "?serch=res" with paging

http: //localhost/testing/main/10?serch=res

how can i attach please help

1 Answer 1

1

If you're willing to use segments you could format your url like so:

http: //localhost/testing/main/res/10

then to access your serch and pagination parameters it would be:

$serch = $this->uri->segment(2);
$per_page = $this->uri->segment(3);

http://codeigniter.com/user_guide/libraries/uri.html

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.