hi, I know that this question was ask a lot of time, but i do not find an answer that solve my problem.
I need pass another parameter in a callback function, or at least bring a value into my callback function. This is what I have in my controller
function Test (){$operacion = 'Insertada traza'; // $this->crud->callback_after_insert(array($this, 'insert_traza'),$operacion);// I tried with this and do not work $this->crud->callback_after_insert(array($this, 'insert_traza['.$operacion.']')); // I tried with this and do not work } public function insert_traza($post_array, $primary_key ) { $operacion = $this->input->post('operacion'); $this->db->insert('about', array( "id_about" => $primary_key, 'descrip' => $operacion )); return true; }
the primary key was insert ok in the respective table, and insert a "0" in the descrip field in my database, if I change the field the value "0" is inserted in that other field.
¿How can I get a value and insert it in my table?
Thanks in advance