Friday 23 September 2016

Codeigniter Tutorials - Insert Data into Mysql Database Table

Hello friends this is my codeigniter series tutorial, in this tutorial we are going to learn some advance concept of codeigniter, in this tutorial we will discuss how to insert data into mysql database table in codeigniter framework. In previous video of codeigniter tutorial we have show some basic introduction about codeigniter framework, what is model view controller in codeigniter framework and how to remove index dot php file frol url. This all things we have discuss in my preivous codeigniter framework, now in this video we will learn how can we insert data into Mysql database table by using Codeigniter framework. All you know codeigniter framework is purely based on model view controller work flow, for example here we want to insert data into database table, so user will fill up the form which we have define under view file, when user will submit the form the request is send to controllers, then controllers will send this request to models and then after lastly models will insert data into database. So this framework is purely based on models views controllers work flow.

So friends in this video we have show how to create html form in view and display that html form on browser by using controller, then after we have show how to use form validation libraries of this codeigniter framework and how to apply validation rule of this libraries to html element and how to display validation error on html form, then after we have show how make database connection into this codeigniter framework and then after we have make insert data function in models and called that models function into controllers and then after data will inserted into database. So this way in codeigniter framework, first it received request for data inserting request from view and this view send request to controllers, then controllers send data to models and models insert data into database then it again send to controller and controller again load views. So this is the complete mvc work flow of this insert data into database in codeigniter framwork.

1 comment: