Welcome Guest, Not a member yet? Register   Sign In
how to load two view CodeIgniter ($data and compact ) in same time
#1

i am new in CodeIgniter framware
i tried to make this work in same time but not working
else if i stop one of it this line
1- $this->load->view('account/build_profile', $data);
2 - $this->load->view('account/build_profile',compact('country','industry'));
of this code
thanks 
Code:
function build_profile(){
        if($this->session->has_userdata('cus_id')){
        $status=$this->my_function->complete_status($this->session->cus_id);
        if($status==0){
        $query=$this->query_model->select1("cn_id,cn_name","ambit_country");
        $country=$this->query_model->details($query);
        $query=$this->query_model->select1("ind_id,ind_name","industry",array("status"=>1));
        $industry=$this->query_model->details($query);


        $data['page'] = 'country-list';
        $data['title'] = 'country List | TechArise';
        $data['geCountries'] = $this->account->getAllCountries();   



         $this->load->view('account/build_profile', $data);

        $this->load->view('account/build_profile',compact('country','industry'));
Reply




Theme © iAndrew 2016 - Forum software by © MyBB