Welcome Guest, Not a member yet? Register   Sign In
[solved] die() function
#6

[eluser]Amitabh Roy[/eluser]
@tuckee Though the way you suggest is not perfect, but if you want to do it your way, the way to proceed would be


Code:
function check_user()
{
$logged_in_type = $this->session->userdata('type'); //retrieve data from session
if ($logged_in_type == '')
{
   $data['heading'] = 'Sorry!';
   $data['content']="Fail";
   $this->load->view('general_view', $data);//if not valid we load the general view
}else{
  $this->load->view('login_success_view', $data);//we passed! so we load the success view
  }
}


Messages In This Thread
[solved] die() function - by El Forum - 01-19-2012, 03:50 AM
[solved] die() function - by El Forum - 01-19-2012, 03:59 AM
[solved] die() function - by El Forum - 01-19-2012, 04:02 AM
[solved] die() function - by El Forum - 01-19-2012, 04:38 AM
[solved] die() function - by El Forum - 01-19-2012, 05:06 AM
[solved] die() function - by El Forum - 01-19-2012, 07:42 AM
[solved] die() function - by El Forum - 01-19-2012, 12:03 PM
[solved] die() function - by El Forum - 01-19-2012, 04:17 PM



Theme © iAndrew 2016 - Forum software by © MyBB