Loading…

How to insert data into database in codeigniter?

You can use $this->db->insert(); to insert data in your database in Codeigniter.

Example

                                        

If you want to insert this in your "Admin Table".

$dataArray = array(
       'name'=>'bestinterviewquestion.com',
       'phone'=>'9971083635',
       'email'=>'info@bestinterviewquestion.com'
);

$this->db->insert('Admin',$dataArray);

// Here "Admin" is My TableName

Suggest An Answer

No suggestions avaliable!

Latest post from CodeIgniter Interview Questions

Ask Question