no no, I don't mean how to access the values, that's not the problem. What I can't do is make a program that will take data entered into a form (which has been generated through PHP) and update it into the table.
Here's an example:
Table 1:
ID | Name | Date
1 | Joe | 12/12/90
2 | Mike | 13/14/91
Table 2:
ID | Name | Gender | Date
1 | Emma | Female | 10/11/84
2 | Mark | Male | 09/09/93
3 | Alek | Female | 01/02/89
Now, I can create a form that will display both these tables, and allow users to input new values for the various fields then pass them on. What I can't do is update all the changed values into the MySQL table because I can't figure out how to let the program loop through all the columns and rows (since the number of rows and columns will change).
I'm trying to use a two dimentional array, but I'm having difficultly getting it to work. I can't figure out what I'm doing wrong, but I can only manage to pass values from some of the form elements. Specifically, checkboxes and hidden fields don't work. Here's how I have them defined:
<input type='checkbox' name='Values[$RowNumber][$ColumnName]' value='$ColumnName' checked>
<input type='hidden' name='Values[$RowNumber][id] value='$id'>
The problem is that the checkbox does not pass it's value even when it's checked, nor does the hidden field. I've tried accessing them both with "foreach($Values[1] as $i => $Data)" and directly "$Values[1][id]". Neither work.