how to update form data in codeigniter

后端 未结 3 1930
感情败类
感情败类 2021-01-14 14:03

I am new in codeigniter.

I am using codeigniter for this project. I have not getting how to update form data in the database. I have inserting,showing data in the dat

3条回答
  •  没有蜡笔的小新
    2021-01-14 14:44

    You are only passing $id in

    $this->usermodel->entry_update1($get['id']);

    and in function u did

    public function entry_update1($id) {
        $this->db->where('id', $id);
        $this->db->update('user', $data);
    }
    

    so you have to pass $data also in you function call

    $this->usermodel->entry_update1($get['id'], $data);

    public function entry_update1($id, $data) {
        $this->db->where('id', $id);
        $this->db->update('user', $data);
    }
    

提交回复
热议问题