Welcome Guest, Not a member yet? Register   Sign In
Form submit using wrong path
#6

[eluser]Pascal Kriete[/eluser]
When you run the validation using:
Code:
$this->validation->run()
All your post data is changed according to the validation rules you set for each field.

As for the model, in CodeIgniter the model is simply another layer, unlike in rails where it is tightly connected to the database. You pass data to it the way you would to any other function. It's basically just a place for your database calls.

If you have a lot of fields (but don't want all of them) you might consider making an array of those you want to add and then looping through that:
Code:
$this->load->model('Your_model');

// Array of field names to be added
$fields = array('field1', 'field2'...);

foreach ($fields as $field) {
    $this->Your_model->addField($field);
}


Messages In This Thread
Form submit using wrong path - by El Forum - 01-12-2008, 04:00 PM
Form submit using wrong path - by El Forum - 01-12-2008, 04:13 PM
Form submit using wrong path - by El Forum - 01-12-2008, 04:22 PM
Form submit using wrong path - by El Forum - 01-12-2008, 05:19 PM
Form submit using wrong path - by El Forum - 01-12-2008, 05:25 PM
Form submit using wrong path - by El Forum - 01-12-2008, 05:41 PM
Form submit using wrong path - by El Forum - 01-12-2008, 07:52 PM
Form submit using wrong path - by El Forum - 01-12-2008, 10:23 PM
Form submit using wrong path - by El Forum - 01-13-2008, 02:45 AM
Form submit using wrong path - by El Forum - 01-13-2008, 03:41 AM
Form submit using wrong path - by El Forum - 01-13-2008, 06:16 AM
Form submit using wrong path - by El Forum - 01-13-2008, 11:28 PM
Form submit using wrong path - by El Forum - 01-13-2008, 11:48 PM
Form submit using wrong path - by El Forum - 01-13-2008, 11:50 PM
Form submit using wrong path - by El Forum - 01-14-2008, 12:06 AM
Form submit using wrong path - by El Forum - 01-14-2008, 12:25 AM
Form submit using wrong path - by El Forum - 01-14-2008, 12:49 AM



Theme © iAndrew 2016 - Forum software by © MyBB