I’m new to CodeIgniter. Previously I had developed a login script that would make it so that the login page appeared to be the same page the user was viewing by having lines similar to the following:
include('loginpage.php');
exit;
But with CodeIgniter the following results in nothing being displayed because the functionality of the output class hasn’t been fully executed:
$this->load->view('loginpage');
exit;
So my question is: Are there any alternative means to mimic the functionality from my previous method? Ultimately I prefer this approach because it appears to the use that they are on the page they requested only they need to log in first to see it if they haven’t already.
Try: