Episode 7 Codeigniter Insert Data into Database Table
As shown before, the “insert()” method is so intuitive that it practically doesn’t require any additional explanations. Anyway, you can see above that I built a simple controller class, which utilizes this method, to add a new fictional category to a sample MySQL table.
source