[eluser]Mostafa Hassan[/eluser]
i do check in construct function
Code:
function __construct(){
parent :: controller();
// check cookie and admin information
$this->load->database();
$this->db->where('id','1');
$query_admin = $this->db->get('admin_info');
foreach ($query_admin -> result_array() as $admin_info){
if (isset($_COOKIE['admin_name']) && isset($_COOKIE['admin_password']) && $_COOKIE['admin_name'] == $admin_info['admin_name'] && $_COOKIE['admin_password'] == $admin_info['admin_password']){
return true;
}else{
$this->load->view('admin/admin_login');
return false;
}
}
// end check
}
but it still execute other functions
i want to stop executing the other functions
i think return false; not working