Skip to main content

Posts

Showing posts with the label Jquery Ajax

Username availability checking in database using php with jquery ajax method

Jquery ajax is the best way to check whether the username is available or not. Only using core ajax code is too long and difficult rather than ajax jquery. So use, jquery ajax method for ajax operation. Actually, ajax helps to get or retrieve and post the data from and into the database without reloading the pages.

Lets follow these core coding of jquery ajax which helps you to check the availability of username or any other data.

First of all you need different 3 codes:

Database tableSimple HTML Form with Jquery Ajax methodPHP coding "check_username.php" Database Table Create a table name users in database name test using like following codes:
CREATE TABLE users(
id int(11) not null auto_increment
username varchar(255) UNIQUE KEY,
password varchar(255),
PRIMARY KEY (id),
);
Simple HTML Form <!doctype html>
<html>
<head>
<script src="<ADD JQUERY LIBRARY URL HERE>"></script>
ADD BELOW SCRIPT HERE OR ADD THE URL
</head>
<body>
<f…