In this tutorial, I will show you creating a login system using CodeIgniter. To generate decent login form design we gonna use Twitter Bootstrap styles.
We need a database and a table with user details so let’s import below sample SQL into the database or you can adjust the code according to your database, table, and data…
Here are the steps to build a simple login system using CodeIgniter 3
Step 1: Download and install CodeIgniter.
Step 2: Open
application/config/config.php file and set your base URL, mine is
$config['base_url'] = 'http://localhost:3030/'; and update
$config['sess_save_path'] = sys_get_temp_dir();
Step 3: Open
application/config/database.php file and set your database config details, here is mine
Step 3: Now create a controller file called
application/controllers , with blow login and logout methods.
Step 4: Now create a login form view file called
application/views directory, along with blow Html code.
Step 5: That’s it. Now head over your browser to
I hope you like this Post, Please feel free to comment below, your suggestion and problems if you face - we are here to solve your problems.
I am Arjun from Hyderabad (India). I have been working as a software engineer from the last 7+ years, and it is my passion to learn new things and implement them as a practice. Aside from work, I like gardening and spending time with pets.