Codeigniter framework provides easier way to insert records into a given database table. We need to assign the values into respective attributes using and array. Then we can insert whatever the record using a single line of code. SQL statements are handled by the framework itself. $record = array( 'field_1' => value_1 'field_2' => value_2, 'field_3' => value_3, 'field_4' => value_4 ); $this->db->insert('name_of_the_table', $record);
Codeigniter supported inbuilt Email library class which simplify the email sending process. To send email we need to do some configuration , need to load email library.codeigniter supports Multiple Protocols, Mail, Sendmail, and SMTP, Multiple recipients, CC and BCCs,HTML or Plain text email, Attachments ,Word wrapping and many more. Lets start with Codeigniter email configurations. Here I have used gmail as smtp server. $this->load->library('email'); // Email configuration $config = Array( 'protocol' => 'smtp', 'smtp_host' => 'ssl://smtp.googlemail.com', 'smtp_port' => 465, 'smtp_user' => 'senders_email_address', 'smtp_pass' => '********', //Password of senders email 'mailtype' => 'html', 'charset' => 'iso-8859-1' ); Now, we can send the email with above co...