Welcome Guest, Not a member yet? Register   Sign In
important question
#1

[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


Messages In This Thread
important question - by El Forum - 09-05-2010, 03:37 AM
important question - by El Forum - 09-05-2010, 07:48 AM
important question - by El Forum - 09-05-2010, 08:38 AM



Theme © iAndrew 2016 - Forum software by © MyBB