check_availablity

Today we will see how to check whether user already exists in database with Ajax and jquery. It is very easy.
We have to make sure that you have autoload “url” helper and “database” library in your application by defining that in autoload.php file.

Here is a test table as follows:
Create Table

CREATE TABLE tbl_users (
uid int(11) NOT NULL AUTO_INCREMENT,
username varchar(100) DEFAULT NULL,
PRIMARY KEY (uid)
)

here is your view:

Here is the controller code:

Here is the Model code:

Download Files:

Download

– codeigniter check username exists –