Welcome Guest, Not a member yet? Register   Sign In
best place to put login views?
#1

[eluser]dadamssg87[/eluser]
is it bad practice to load views within views? Basically trying to figure out where i should put code like this...

Code:
if(isset($this->session->userdata('logged_in'))
{
$this->load->view('loggedin_view');
}
else
{
$this->load->view('loginform_view');
}

should i put that snippet in a controller? or should i put it in my header_view? Seems like i would write less code if i stuck it in my header_view file. Any suggestions would be great. thanks


Messages In This Thread
best place to put login views? - by El Forum - 04-21-2011, 02:23 PM
best place to put login views? - by El Forum - 04-21-2011, 02:40 PM
best place to put login views? - by El Forum - 04-21-2011, 03:41 PM



Theme © iAndrew 2016 - Forum software by © MyBB