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

[eluser]tuckee[/eluser]
thanks for all your reply.

the reason why i implement this because many of the function i will be putting check_user() before really executing the real function. thats why i couldn't use the way u suggested

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
  }
}

becuase i need to reuse check_user many times. anyway thanks for your reply.

by echo $this->load->view('general_view', $data, TRUE); then only die();

it works. thanks!


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