[eluser]Christopher Blankenship[/eluser]
I agree with Bulk, passing post variables directly into a database is bad form; if you intend the application to be for anything other than a quick and dirty example (which I apologize for) or in this case a task management system for myself which is not accessible by anyone but myself. So to that end:
Code:
/* 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");
would be as follows:
Code:
/* 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.
*/
$recs = $_POST['rec'];
$this->db->insert('ticket', $recs);
redirect("$base_url");