Inserting data in a column with condition |
When on of the admin clicks an approve button its supposed to add the user_id of the person approving to a field in approval table
This is the button Code: <?php echo anchor('admin/messages/approve/'.$message->id.'', 'Approve', 'class="btn btn-success"'); ?> This is the approve function in Controller Code: public function approve($id) { This is the approve method inside the Model Code: public function approve($data) { I have sms_id, first_approval, second_approval and third_approval columns in my approval table but for now I'm just testing if I can put session->user_id in the column 'first_approval'
(10-27-2016, 08:50 PM)enlivenapp Wrote: So what's your question? I have changed to this Code: public function approve($id, $data) { |
Welcome Guest, Not a member yet? Register Sign In |