0
public function index()
{
$data['home'] = $this->load->view('home', $data, true); // load view
}

public function register_user(){

$data['home'] = $this->load->view('home', $data, true); // load view
}

in my home.php (view) there is a link to click to home/register_user and I got an error headers already sent error. I think I know why because my index of home controller also load the view. But if I removed the index's load view, then my home page is broken, because unregistered user will land first.

user3522742
  • 51
  • 1
  • 6
  • possible duplicate of [How to fix "Headers already sent" error in PHP](http://stackoverflow.com/questions/8028957/how-to-fix-headers-already-sent-error-in-php) – M Khalid Junaid Sep 16 '14 at 11:59

1 Answers1

0

Remove the header which is already sent using

void header_remove ([ string $name ] )

http://in3.php.net/header_remove

iNikkz
  • 3,729
  • 5
  • 29
  • 59