Posted in JavaScript Jquery PHP Tutorial

Check Username Availability Using PHP And Jquery

Check Username Availability Using PHP And Jquery Posted on October 3, 2011Leave a comment

Deepanker Verma is the CEO of Techlomedia and a full time blogger. On this blog, he shares web design resources, SEO tips blog monetization tips.

Best WordPress Hosting

In a registration form there is a need to check the available user name. Using ajax request to check available username is a good idea. It is required and reduce users’ effort while registering for a new account. You have seen this kind of arrangement in Gmail sign up form for validation of available email address.

For this, you need to check whether the username exists or not dynamically. You can do it with the help of jQuery and PHP. First of all create an HTML form. Then use jQuery to call a PHP file. This Php file will check the available usernames in database.

See the code of all files below.

Advertisement

JQuery Code

CSS code

Php code:

HTML code:

Integrate these codes.

In php code, I have used array for used username. for a real time application you will have to fetch used username from database. If you have any kind of problem in implementing that, you can ask via comments.

advertisement

Deepanker Verma is the CEO of Techlomedia and a full time blogger. On this blog, he shares web design resources, SEO tips blog monetization tips.

Leave a Reply

Your email address will not be published. Required fields are marked *

Subscribe To Our Newsletter

Subscribe To Our Newsletter

Receive fresh web design resources and SEO tips in your email by our weekly newsletter

You have Successfully Subscribed!