Welcome Guest, Not a member yet? Register   Sign In
POST data in model
#4

[eluser]ELRafael[/eluser]
in my case only controller.

in the model i don't pass anything about input... only vars!

So, if in my view
Code:
<input type="text" name="name">

And the controller
Code:
$name = $this->input->post('name');
$this->model_file->get_names($name);

Model
Code:
function get_names($_name)
{
  $this->db->where('name LIKE', $_name.'%');
  return $this->db->get('table');
}

See? My model is only to "talk" with database, like select, insert and others


Messages In This Thread
POST data in model - by El Forum - 10-26-2007, 12:36 PM
POST data in model - by El Forum - 10-26-2007, 01:18 PM
POST data in model - by El Forum - 10-26-2007, 01:35 PM
POST data in model - by El Forum - 10-26-2007, 03:08 PM



Theme © iAndrew 2016 - Forum software by © MyBB