Populating text form fields from a MySQL database once a user has entered data
Posted 22 July 2006 - 09:51 PM
I have a form with 6 text fields in it. When a user enters information in the second text field, I want PHP to "check" a table on my MySQL database for a corresponding record. If it finds a match, then it populates the final 4 text fields with the relevant information from that record (I imagine this "check" needs to be called every time anything is changed in the second text field?).
Can anybody help me (I am fairly new to PHP and MySQL) ?
Many thanks in advance,
Posted 23 July 2006 - 09:27 AM
Posted 23 July 2006 - 10:51 AM
But, you can use AJAX to do this. When a fields value is being changed AJAX will send the information to the server on the background (without changing any page etc'), get the information back from the server and use this information in any way you want.
Google for AJAX tutorials.
(Gone until 20 to November)
Posted 23 July 2006 - 12:59 PM
Posted 23 July 2006 - 02:50 PM
But, anyway you'll need PHP to check things with database, and some client-side script to trigger PHP when user change data in field.
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users