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:

Login.php

Create Model:

User_model.php

Create Views:

Login.php

login-thankyou.php

 

Author: Ahsan Zameer

I am a web developer and love to search new stuff on web. Trying different approaches and ideas to make web developing more interesting and enjoyable.