PHP form question utilizing mysql database.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • kd8con
    New Member
    • Dec 2006
    • 4

    PHP form question utilizing mysql database.

    Ok, I am writing an application in which - a user enters data into a field, then when leaving this field and going to the next field, I need to do a search on the access database for that data and pop up a window if it exists giving specific data from that record in the database.

    Setting up the database connection is done, since it is the same database - what I'm having a problem with is performing this action during a field entry. Also I would like to change fields based on previously entered fields, I think I have this figured out - but no the first issue.

    If anyone can make heads or tails out of what I'm trying to do - any help would be greatly appreciated.

    Thanks in advanced.

    Steve
  • ronverdonk
    Recognized Expert Specialist
    • Jul 2006
    • 4259

    #2
    If you want to accomplish this without hitting submit, you can use anynchronous JavaScript/PHP communication (AJAX). That way, when leaving the entry field, a JS routine gets control, submits a request to the server program that extracts the data from the database and passes the results back to JavaScript, that can dynamically display it in your form fields or as a separate popup.

    Ronald :cool:

    Comment

    • kd8con
      New Member
      • Dec 2006
      • 4

      #3
      Thank you - another language to learn - hmmm. It's always fun huh? I have never used AJAX or javascript before so I guess it would be useful to me to check into this.

      Thanks again!

      Steve

      Comment

      • ronverdonk
        Recognized Expert Specialist
        • Jul 2006
        • 4259

        #4
        If you want some AJAX info, related to your question. Have a look at the Ajax scripts site, that contains a number of samples. The one that will interest you, I presume, is the entry named Dynamic client lookup. Have a look.

        Ronald :cool:

        Comment

        Working...