Create login form in Codeigniter - phptpoint

Create login form in Codeigniter

Best PHP Training with Live Project in Noida Fee is only 7500/-Click here for FREE DEMO.

/ins>

Create login form in Codeigniter

In this tutorial we will understand how to create simple login form in CodeIgniter.
For login page we will check student’s email and password is valid then redirect on dashboard method.
otherwise display an error message on login view page.

We will use student table to login

This is student table structure

Table Name : student
student_idint primary key auto_increment
namechar(50)
emailvarchar(100)
passwordvarchar(100)
mobilebigint
coursechar(100)

Controller

Copy the below given code in your User Controller.

Login View

Copy the below given code in your login.php View Page.

Execute User Controller’s login method

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

Output(if wrong email or Password)


Dashboard View

Copy the below given code in your dashboard.php View Page.

Output(Dashboard page)


Keep Updating yourself