Welcome Guest, Not a member yet? Register   Sign In
Passing data from controller to model in an array. Please help!
#1

[eluser]murphy2006[/eluser]
Hello!

I am trying to pass an array of POST data from a controller into a model.
How is this done? How can I then access the data in the model?

The controller code look like this (is it correct?):

Code:
$result = $this->items_model->add( array(
        
        'ite_owner' => $this->post('user'),  
        'ite_type' => $this->post('type'),
        'ite_value_1' => $this->post('value_1'),
        'ite_value_2' => $this->post('value_2'),
        'ite_value_3' => $this->post('value_3'),
        'ite_value_4' => $this->post('value_4'),
        'ite_value_5' => $this->post('value_5'),
        'ite_access' => $this->post('access')
        
        ));

Please help!


Messages In This Thread
Passing data from controller to model in an array. Please help! - by El Forum - 07-24-2010, 08:37 AM



Theme © iAndrew 2016 - Forum software by © MyBB