[eluser]opel[/eluser]
I have used PHP to handcode my own CMS but have been playing bout with CI. I am aware there are plenty of CRUD libraries out there but I am trying to create my own controllers/models to add/edit/delete data so that I can understand my app and CI before.
I have tried to update my old class methods for insert and update into CI but I am not having much luck. What I am trying to do is take all the values of $_POST, unset the button value and then generate an array that I can use in AR to insert/update my db
the code that I am trying below is loosing the "$this" part when I try to print_r as a test.
Code:
function process_add() {
unset($_POST['Submit']);
foreach($_POST as $key=>$value){
$data[$key] = $this->post->('$value');
}
}
Could anyone give me any suggestions or point me in the way of a tutorial that may help?