PHP Tutorials: jQuery: Check if a username is available without refreshing

Posted on July 25, 2010, 6:17 pm
26 secs



Check if a typed username is available without page refreshing. Basically, an AJAX style check, but using jQuery.

Subscribe to phpacademy and enjoy more free web development tutorials!

Our channel
http://youtube.com/phpacademy

Official website
http://phpacademy.org

Support Forum
http://phpacademy.org/forum

Follow us on Twitter!
http://twitter.com/phpacademy

27 Responses to: PHP Tutorials: jQuery: Check if a username is available without refreshing

  1. September 20th, 2013

    if anyone Is having problems with this code, change the document.ready(function()) to just $function()

    That worked for me

    Reply
  2. September 26th, 2013

    i'm using WAMP and i tried to show dummy data but doesnt work! i dont know why ?? i have to install other tools to read jquery??

    Reply
  3. November 12th, 2013

    I'm sure you misspoke, but I think # in css indicates that feedback is an id, not a div.

    Reply
  4. December 25th, 2013

    could someone help me on this.
    When the page loads for the 1st time, it always show this Notice msg: 
    "Notice: Undefined index: username"
    but when I wrote something on the textbox, it disappear.
    how could I fix this?

    Reply
  5. December 28th, 2013

    Is it possible to do this for two different fields with two different divs using the same check.php. Great video. Thanks 

    Reply
  6. December 28th, 2013

    Is it possible to do this for two different fields with two different divs using the same check.php. Great video. Thanks 

    Reply
  7. March 5th, 2014

    What about putting the scripts at the end of the page? Nice tutorial though, thanks!

    Reply
  8. March 5th, 2014

    Also, can't you do mysql_query("SELECT username FROM mydatabase.users") instead of having the mysql_db_select??

    Reply
  9. March 21st, 2014

     Notice: Undefined variable: _post in C:wampwwwnew projectcheck.php on line 4
    error is showing on webpage how to resolve it

    Reply
  10. July 7th, 2014

    Nice tutorial but my page display by default

    Notice: Undefined index: username in    check.php on line 3

    Reply
  11. September 1st, 2014

    this is excellent tutorial….But there is something Unreadable(look so bad) by default in feedback div. although i works 100%.

    Reply
  12. September 30th, 2014

    i cant get it to work

    Reply
  13. November 5th, 2014

    im having problems adding one more field can anyone help me im trying to add email is available 

    Reply
  14. October 10th, 2015

    not working……….. and do i need this to work jquery.js

    Reply
  15. October 11th, 2015

    great but how can i disable button if it is too short

    Reply
  16. February 17th, 2016

    worked!! but i have button to submit the form to sql. how do i disable the submit button when username is not available?

    Reply
  17. April 11th, 2016

    Vary helpful. Thank you. But how can i disable the submit button if the name already exist? It will be really helpful if you suggest any solution.

    Reply
  18. April 12th, 2016

    i'm using WAMP server 2.0 and i tried to show dummy data from check.php but its not displaying! what seems to be the problem?

    Reply
  19. June 5th, 2016

    it keeps thinking a NULL is given.
    Warning: mysqli_num_rows() expects parameter 1 to be mysqli_result, null given in E:wampwwwphpscriptssignup.php on line 85

    Reply
  20. June 5th, 2016

    this is cool and all but its not working for me. neither is anything else. i have been at this for weeks and cant fucking figure it out.

    Reply
  21. June 20th, 2016

    Thanks, very helpful !

    Reply
  22. July 17th, 2016

    Sir, please help me. I'm Stuck and i really need this for my final project. I'm stuck at when you want to test your $('#feedback').html(result).show(); , i got the error of undefined index but i manage to remove the error with solution from the comment section(thank you) but i didn't get anything when i typed in the username textbox. When i remove everything inside the check.php and type something like aasdasd , it appeared on my index.php but when i use the php code echo $username = $_POST['username']; nothing appear or happen on my index.php.

    Reply

Leave a Reply

  • (not be published)