URL segment - User Profiles - Codeigniter
It's because the controller is looking for a function called ChrisSalij.
A few ways to solve this:
change
function index(){$data['username'] = $this->uri->segment(2);
to be
function index($username){ $data['username'] = $username;
and use the URL of mysite.com/user/index/ChrisSalij
- if you don't like the idea of the index being in the URL you could change the function to be called a profile or the like, or look into using routing
and use something along the lines of
$route['user/(:any)'] = "user/index/$1";
to correctly map the URL of mysite.com/user/ChrisSalij