mardi 10 septembre 2019

I am trying to use if within another if statement working but i am getting some error

I want try if within if loop use but getting some error black page no error show please check its and help me

public function login2($otp) {

    $this->db->where('otp', $otp);  

    $query = $this->db->get('login');

    if ($query->num_rows() == 1)  
    {
    //$this->load->view('index');   

         if ($role=='1' && $type=='1')
            {
              $this->load->view('index');
            }

        else if ($role=='2' && $type=='1')
            {
              $this->load->view('admin/index');
            } 
    }
    else
    {
        $_SESSION['error']='Wrong OTP Plese Enter correct OTP';
        $this->load->view('otp');
    }
}

Aucun commentaire:

Enregistrer un commentaire