CodeIgniter Insert Data into Database - phptpoint

CodeIgniter Insert Data into Database

PHP Summer Training/Internship with 2 Live Projects in Noida Fee is only 5500/-Click here to Book Your Seat.


CodeIgniter Insert Data into Database

CodeIgniter gives you access to a Query Builder class.
This pattern allows information to be retrieved, inserted, and updated in your database with minimal scripting.
In some cases only one or two lines of code are necessary to perform a database action.

In this tutorial we will understand how to Save Records inside database using CodeIgniter Core Library.

Here we are going to use student table to Save Records and Check user’s existence.

This is student table structure

Table Name : student
student_idint primary key auto_increment


Copy the below given code in your User Controller.

Registration View

Execute User Controller’s index method

Open your web browser and Pass : http://localhost/CodeIgniter/index.php/user/index

Output(Save Records if email id is not already exists)

Output(Show error “This user already exists”)

Latest Trending Technologies