[eluser]solid9[/eluser]
I already solved this problem.
Here is the new modified controller that works.
Code:
//redirect to specific page depending on the menu selected by the user.
function menu_selector($str) {
$username = $this->session->userdata('username');
$this->data['header_message'] = '';
$this->data['header'] = $this->load->view('header', $this->data, TRUE);
$this->data['member_menu'] = $this->load->view('member_menu', null, TRUE);
$this->data['midnav'] = $this->load->view('body_m_frontpage', $this->data, TRUE);
$string = uri_string($str);
if($string == "main/menu_selector/home") { //redirect to index page
//$this->index();
echo 'Home page';
$this->load->view('front_page', $this->data);
} elseif($string == "main/menu_selector/post") { //redirect to post page
echo 'Post page';
$this->load->view('front_page', $this->data);
} elseif($string == "main/menu_selector/edit") { //redirect to edit or delete page
echo 'Edit page';
$this->load->view('front_page', $this->data);
} elseif($string == "main/menu_selector/msg") { //redirect to message/inbox page
echo 'Message page';
$this->load->view('front_page', $this->data);
} else {
}
}
Often the echo is very helpful.