Hi there,

I've hit a brick wall in the sense that I can't seem to think up the logic required to perform this task.

Basically I have a number of rows that are populated by a MySQL database. There are a few columns which a user must fill in to update certain information which are input fields. Without using Jquery/Ajax, everything is working fine. The only issue is that, to make data entry easier, autocomplete these fields based on a first name entered. This first name entered retrieves information from a MySQL database via PHP and Jquery autocomplete.

I have this working well when only one row is modified but as you can imagine there are many rows on a page and each one needs to be validated separately.

Here is the Jquery which works on a single row.

<script type="text/javascript">

    source: "contractor_prefill.php",
    minLength: 1,
	select: function(event, ui) {

Here is an example of the HTML:

 <input type=\"text\" name=\"inst_fname[]\" id=\"inst_fname\"  ></td> <td>
 	 <input type=\"text\" name=\"inst_lname[]\" id=\"inst_lname"\"></td> <td>
I understand that you need unique IDs for this to work but this is where I fall short. I tried to use classes but that just duplicated the data on all rows. I have even started thinking about using for loops but it's starting to get messy.

If anyone can point me in the right direction I would be truly grateful.