Adding values to mysql from dynamic values

Hi all,

I have a page that draws a list of values from a mysql table using a ‘while’ loop. Next to each value is drawn a textfield to enter a number for each value.

To help explain: I’m designing a timesheeting system and there is a list of tasks to associate with each job. The tasks might include Concept Generation, Phone calls, Administration, Brief Generation, Testing and Validation etc. These are the values pulled from the mysql table.

Next to each value I’ve put a textfield so the user can enter a number of hours to give each task.

The whole thing is done dynamically because the user has the option of adding or removing tasks from the system - so I can’t hard code the values or the texfields in html.

Each textfield gets an identifier matching the task name and these have been successfully passed and matched in the form action page.

The bit I am having trouble with is inserting each task and hour value into a table. I’ve tried using a while loop but I only get the first value entered. I’ve tried variations of appending numbers to the variable names in the loop to make sure that each query and result are unique, but to no avail. The best I can get is one task and hour value entered.

Does anyone have any ideas or has anyone seen a similar effect before? I can post code if anyone would like to help.

Cheers,
C