Here i am going to give a simple example of insert operation with student details.
1.)First create a database and  name it as codeigniter,
    Create a table with the name students[columns-id,name,email,age].
2.)Create a controller class with the name student.
     Inside that index() method should locate the view file.
      After submission the datas should be passed to model for that create a method called inserts().
      Now my controller will look like ,

3.)Create model class that access the database insertion operation[ name - Student_model].
     Inside that create a method add_student().
     Now my model will look like,

4.)in view side insert.php should be,


5.) Now run the file localhost/codeigniter/
  THis will look like,

When u click the submit the data will be inserted into the database

Give comments for more clear tutorials