w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Dynamic navigation menu with codeigniter

I think you have mistaken the logic in your controller. In case the user is logged in your views are loaded two times. Overwrite your view function with this one:

public function view($page = 'home')
{
    $session_data = $this->session->userdata('logged_in');
    $data['username'] = $session_data['username'];

    $this->load->view('templates/header');
    $this->load->view('pages/home');
    $this->load->view('templates/footer');
}




© Copyright 2018 w3hello.com Publishing Limited. All rights reserved.