username validation using codeigniter-check the username in the databse for validating a user

By | May 23, 2014

Here 2 validations are added first one is if user not entering any values it will alert message.second is if user enter ‘’ in the username field it will throw alert message.

step1:Create a database in mysql using phpmydmin.After installling the xaamp/Waamp Type the below url into the browser.


# create a database called testlogin.
# create table users inside the the db testlogin.for creating table users you can use the following queries

step2:Change the values inside the database.php file inside the config folder

stept3:create view file inside the application/views-uservalidationpage.php


step4:create a model file inside the application/model-username.php

step5: create a controller inside the application/controllers/usernamevalidation.php


Click to see the Demo

Click here to see the detailed code and demo