Codeigniter
How To insert Data in Codeigniter easily

How To insert Data in Codeigniter easily

By: SolutionsHint    37 views Updated: 01st Oct, 2018
How To insert Data in Codeigniter

Hello everyone, from today I will start to cover the tutorial for the CodeIgniter framework of PHP, because we have already discussed the insert data using PHP and insert data using WordPress, but now we are turning towards CodeIgniter which is the most amazing and simple framework of PHP, that is mostly used for website development which is free open source.

Must Read: Insert data into PHP

How To insert Data in Codeigniter easily?

We are just taken a 3 field form HTML and trying to insert, you can add more field according to your project.

Step 1: First create a file Register.php inside the views and the following the line.

Step 2: Now create a controller file inside the controllers directory Register.php  we have to create the same name to understanding, you can create with a different name according to you.

Step 3: Now create a model which help to interact with database activity. we have created Site_model.php into models directory.

Database:  Create table query, perform these query directly create into PHPMyAdmin

Note: Don’t forgot to change $config[‘base_url’] = ‘http://localhost/ci/’;  into config.php

Note: add the following line to work with form and database into autoload.php

Done!!!

 

About the Author

I am a professional blogger from my heart, I am going through all the possible ways that can help to audience. I am trying my best to write content that my readers will like me. I will really be happy when my readers will become more happy with my blog.

Leave a Reply

Your email address will not be published. Required fields are marked *