how to store a form data into the table in codeigniter?

Report
Question
60 views

Please explain why do you think this question should be reported?

Report Cancel

Hey guys I am new in CI. I am using CI for my project. I’m not getting how to update a table. I am using MySQL as database in CodeIgniter.
Thanks

Thread Reply

  1. September 10, 2019 at 7:42 pm

    Please briefly explain why you feel this answer should be reported .

    Report Cancel

    You should to pass data with the row id because id is primary key (I assumed).
    Example –

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

Leave an answer

Browse

You may use these <abbr title="HyperText Markup Language">HTML</abbr> tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>