Results 1 to 2 of 2

Thread: Verify text input against mysql db

  1. #1
    Join Date
    Feb 2014
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Verify text input against mysql db

    Hi ... looking for a javascript routine that, when someone enters a value in a text input box, checks to see if that value is already in a mysql db, and if so provides an alert message. Ideas?

  2. #2
    Join Date
    Apr 2006
    Posts
    205
    Thanks
    11
    Thanked 0 Times in 0 Posts

    Default

    Hi jsnul,

    I think it will be hard to check a MySQL database using JS without having a server side script in between. What language are you using on the backend?

    One idea is that you could send the value via AJAX to a server-side service that runs the check and responds with the result (true/false)?

    Another idea might be to load the data into a JS object on the page (when the page loads) and you could then do the JS check against that while the user is interacting with the input field. It all depends on what the data is, whether it needs to be kept private and how much of it there is.

    Cheers,
    Laurence
    Last edited by dog; 09-04-2015 at 10:17 PM. Reason: subscribing to topic

Similar Threads

  1. Date Input Calendar - input an existing date from mysql-database
    By hahubo in forum Dynamic Drive scripts help
    Replies: 0
    Last Post: 02-26-2014, 10:14 AM
  2. Replies: 2
    Last Post: 04-24-2012, 05:01 PM
  3. Replies: 5
    Last Post: 05-24-2011, 04:20 AM
  4. Replies: 3
    Last Post: 01-17-2010, 12:05 AM
  5. predictive text in input text form
    By surboomer in forum PHP
    Replies: 0
    Last Post: 11-20-2005, 08:59 PM

Bookmarks

Posting Permissions

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