How to create login form in Codeigniter

In my previous post we create registration form in codeigniter. In this tutorial I am going to create login form in codeigniter. I am taking the example of previous post and login using previous post data. In the download link you will get codeigniter having both registration and login code. Now let’s start.

How to create simple login form using Php, Mysql and jQuery

Steps involved in Login form in Codeigniter

  • Create user login form.
  • Submit login form and validate form data.
  • Check user email address and password.
  • If both are correct then create session and send to thank you page.

Create database:

Create database Table:

Create Controller:


Create Model:


Create Views: