Welcome Guest, Not a member yet? Register   Sign In
How to send model return data and some single variable information to view page from controller function
#2

[eluser]Ben Edmunds[/eluser]
Simply add your $data1 to your $data array:

Code:
function membermanage($DboardID,$UserID)
    {
        $this->load->model('board/dboard_members_model');
        $data['query1'] = $this->dboard_members_model->extract_basic_member_info($UserID);
        
        $data['data1'] = array(
               'ID1' => $DboardID,
               'ID2' => $UserID              
              );
              
        $this->load->view('board/manage_members_view',$data);
    }

Then you will have whatever your query returns and data1 accessible from your view.

I have to point out though that your naming conventions are very bad and will become a big issue as your application grows.

For example, I would have the member_info() method also return the ID's and then the controller would look something like this:

Code:
function member_manage($dboardId,$userId)
    {
        $this->load->model('board/dboard_members_model');

        $data['dboardId'] = $dboardId;

        $data['members'] = $this->dboard_members_model->extract_basic_member_info($userId);
        
              
        $this->load->view('board/manage_members_view',$data);
    }

Have fun,


Messages In This Thread
How to send model return data and some single variable information to view page from controller function - by El Forum - 03-27-2010, 02:59 AM



Theme © iAndrew 2016 - Forum software by © MyBB