Welcome Guest, Not a member yet? Register   Sign In
url routing, friendly url
#5

It depends what you want to do in your application and what seofriedly you want.

Slug can be like 'animals-african-elephant' and this way you can use $segment = $this->uri->segment(1) but if you want urls like this 'animals/african/elephant' you should use uri_string() function from Url Helper library.
Also you can use get method to send params with slug like 'animals/african/elephant?page=1&sort=name' and then get data like $this->input->get('page');

You should check if array index exist in this line: $id = $get_link[0]['link_id'];
Reply


Messages In This Thread
url routing, friendly url - by waqaspuri - 10-23-2015, 04:06 AM
RE: url routing, friendly url - by mario - 10-23-2015, 04:41 AM
RE: url routing, friendly url - by waqaspuri - 10-23-2015, 02:21 PM
RE: url routing, friendly url - by waqaspuri - 10-23-2015, 02:23 PM
RE: url routing, friendly url - by mario - 10-26-2015, 12:53 AM
RE: url routing, friendly url - by waqaspuri - 10-26-2015, 12:59 AM



Theme © iAndrew 2016 - Forum software by © MyBB