Live Username and Email Availability Checking using PHP, jQuery and Ajax

In this tutorial we are going to see how to check user name and email availability using PHP, jQuery and Ajax. This task is easily done with the help of jQuery validation plugin remote() method.

When user enters their name or email in the textbox, remote() method of jQuery validation plugin will send the entered value to the backend (PHP File). PHP file compares the entered user name or email with user name or email in the database. If user name or email already exists in the database then it will return ‘false’ string as response. If user name or email not exists already in the database then it will return ‘true’ string as response.

check unique Username and Email Availability using PHP, jQuery and Ajax

Check unique Username and Email Availability using PHP, jQuery and Ajax

check unique Username and Email Availability using PHP, jQuery and Ajax Demo

Demo

Step 1:

Create index.php file and add following html code in it.

 

how to check unique Username and Email Availability using PHP, jQuery and Ajax

Download

Step 2:

Now add following css style in the head of the html file.

Step 3:

Create dummy table using the following SQL query.

then insert some dummy data’s into the table using following SQL query.

Step 4:

Create config.php file to database connection information separtely.

Step 5:

Now add the following jQuery validation script to add validation to user name email fields in the html form.

where remote() will call ajax_unique.php and send user entered information to PHP file during blur() jQuery event.

Step 6:

Here is PHP script that will receive ajax request and compares the users entered information with values in the database. Finally it sends response as ‘true’  or ‘false’ string.

Posted by:

muni
  • http://www.presentationsunplugged.com/blog/?p=14682&cpage=1 http://Www.Presentationsunplugged.com/

    This is my first time visit at here and i am
    actually impressed to read everthing at one place.

  • http://www.seoval.com/profiles/blogs/looking-for-web-design-help-try-these-ideas designers

    I believe everything published was very logical. But, what about this?
    what if you added a little content? I am not saying your information isn’t solid., however what if you added a
    headline that grabbed a person’s attention? I mean Live Usernjame and Email
    Availability Checking using PHP, jQuery and AjaxSmart Tutorials – PHP, MySQL, Jquery,
    JavaScript is kinda vanilla. You could peek at Yahoo’s home page and see how they create article headlines to get viewers to click.

    You might add a video or a related picture
    or two to grab readers excited about what you’ve got to
    say. Just my opinion, it might make your blog a little livelier.

Related articles

My Favorite Blog

Quiz Web App

Responsive Quiz Application Using PHP, MySQL, jQuery, Ajax and Twitter Bootstrap

Be Happy!!!

Inspirational Quotes - Motivational Quotes- Short Stories

Does God Exists?

Inspirational Quotes - Motivational Quotes- Short Stories

Back to Top