Working on FIW.ME!

We are currently working on a next generation URL shortener!

Username availability checker with PHP and jquery

Do you want to tell users while registering if the username they have typed into input field is available or is taken already before they submit the form? Well, it can be easily done with PHP and jquery, it takes no more than few lines.
Username availability checker with php and jquery

 First set a HTML form like this and save it as form.html

Do not forget to attach jQuery script, because it is where the magic lies

Now set up the php page, it is the place where the username availability will be checked

Code goes like this

save this as checker.php

we are done with the HTML and PHP coding, Now

Shall we start jQuery coding?

Now save it, it must be a working masterpiece, You must try it.

What have we just done?

Well, we created a simple form in html, created a php page which interacts with database, and a jquery script which works as bridge between both the files.

whenever you press a key on keyboard, the jQuery script(ajax) send the value to the php page, which checks that if value(username) is already existing in the database, and gives back the response.

  • Betinho Silva

    This code don’t work 🙁

    • Shashikant Rudrawadi

      Sorry, that problem must have been due to code breaking, code broke because of bad theming. Now try the code again. If it doesn’t work, let me know.