Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    Jul 2011
    Location
    Romania
    Posts
    16
    Thanks
    4
    Thanked 0 Times in 0 Posts

    question. Need help fast.

    How can I check the mySQL database with jQuery so that I can tell the user(in the register form) whether the username is taken or not? (like this board's register form).

  • #2
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,865
    Thanks
    160
    Thanked 2,224 Times in 2,211 Posts
    Need help fast.
    Try to break down your problem into several parts.
    1) Make a serverside script to query your database, using a string obtained to the script via GET/POST
    2) Make changes to the above program such that it can return a 1/true or 0/false based on the success/failure of the DB query
    3) Make a jQuery script to send Ajax requests to above made serverside script, along with the user's input.
    4) Catch the return value from the script and show adequate messages/hints to the user.
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)


  •  

    Tags for this Thread

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •