This post will help you to learn the basics of inserting the record in the database using ci framework.
Table Structure
Culumn_Name
|
Data_type
|
Id
|
Auto number(int)
|
Name
|
Varchar(50)
|
Email
|
Varchar(50)
|
Phone
|
Varchar(15)
|
Msg
|
Varchar(255)
|
Configure Database
Goto App (Application in older CI) folder then open Config folder then Database.php file change db parameter as per your configuration.
Database.php
$db['default'] = array(
'dsn' => '',
'hostname' => 'localhost',
'username' => 'username',
'password' => 'password',
'database' => 'db_name',
'dbdriver' => 'mysqli',
'dbprefix' => '',
'pconnect' => FALSE,
'db_debug' => (ENVIRONMENT !== 'production') ,
'cache_on' => FALSE,
'cachedir' => '',
'char_set' => 'utf8',
'dbcollat' => 'utf8_general_ci',
'swap_pre' => '',
'encrypt' => FALSE,
'compress' => FALSE,
'stricton' => FALSE,