[eluser]Christopher Blankenship[/eluser]
Ok. putting my two cents into the mix.
Here is what I like to do to avoid all those $_POST statements.
Code:
/* controller: add_task */
$this->load->helper('form');
$data = array('title' => "Add Task");
$data['pid'] = $this->uri->segment(3);
$this->load->view('add_task', $data);
/* view: add_task */
echo form_open('welcome/add_task_rec');
echo form_hidden('rec[pid]', "$pid");
echo form_textarea('rec[notes]', '');
echo form_submit('Submit', 'Submit');
/* controller: add_task_rec
* this however could be separated out to the model
* if so wished but the point is to pass all the information
* as an array to avoid the $_POST groups.
*/
$this->db->insert('ticket', $_POST['rec']);
redirect("$base_url");
That should at least shorten your coding efforts and help with cleaner code. The code is just an example and I assume you have already gone to application/config/autoload.php and set the following:
Code:
$autoload['libraries'] = array('database');