Create Registration Form using CodeIgniter and MySQL

In this post, We have to share How to Create a Registration Form in CodeIgniter and Bootstrap Framework along with MySQL Database and using MD5 is a 128-bit encryption algorithm. By using this users can easily register, username, first name, last name, email, password fields. After submitting the form, the data will be stored in a database table.This is a very simple example, you can just copy-paste and change according to your requirement.
Before started to implement the Create Registration using CodeIgniter, look files structure:
  • create-registration-form-with-codeignite
    • application
      • config
        • autoload.php
        • constants.php
        • routes.php
      • models
        • Users_model.php
      • controllers
        • Users.php
      • views
        • users
          • thank-you.php
          • index.php
        • templates
          • header.php
          • footer.php
    • system
    • index.php
    • assets
      • images
      • css
        • style.css
Step 1: Create MySQL Database and Table for User Registration
Step 2: Create a model file User Registration
Create a model file named “Users_model.php” inside “application/models” folder.
Step 3: Create a controller file User Registration
Next create a controller file named “Users.php” inside “application/controllers” folder.
Step 4: Create a view file for User Registration
Create a view file named “index.php” inside “application/views/users” folder.
Step 5: Create a Thank you page
Create a view file named “thank-you.php” inside “application/views/users” folder.
So open “application/config/routes.php” file and add code like as bellow: