user3510721
user3510721

Reputation: 55

Codeigniter pagination is not working

I am trying to do pagination in codeigniter. Pagination is coming in the view page, but when I try to click on next link I am getting this error:

The URI you submitted has disallowed characters.

and this is my url while click on next button

http://localhost/indianeers/pages/load_country/&per_page=2.

Please help me to do this pagination. I have been struggling for 3 days.

I have seen this in config.php

$config['permitted_uri_chars'] = 'a-z 0-9~%.:_\-';

Should i change this code?

Upvotes: 2

Views: 314

Answers (2)

Adarsh M Pallickal
Adarsh M Pallickal

Reputation: 821

In your code you pass & with URI and that is not included in the config page.

replace ur code with below code in config

$config['permitted_uri_chars'] = 'a-z 0-9~%.:_\-&';

Upvotes: 3

sunny
sunny

Reputation: 1166

permitted_uri_chars are the characters that CodeIgniter accepts in your URI.The default value is set to something like.

$config['permitted_uri_chars'] = 'a-z 0-9~%.:&_\-'; 

By default only these are allowed: a-z 0-9~%.:_-

Leave blank to allow all characters -- but only if you are insane.

Try this- Add %3D to $config['permitted_uri_chars']

Upvotes: 0

Related Questions