Hi,
I am trying to insert a gear list from a table that is created dynamically from a MySQL database using repeated regions.
The form objects are gearID (from Gear table), scaffoldID (from Scaffold table), noRequired (from gear_List table) and gearName (from Gear table).
I need to insert the form objects (gearID, scaffoldID, noRequired) into an array so they can be entered into the table (gear_List). This is where my problems start.
How do I go about inserting these objects into the array when they are built in the dynamic table.
Should the each of the form object be declared as arrays? Should the form objects be named gearID[], scaffoldID[] etc?
This is the code for the repeat region table at the moment:
<?php do { ?>
<tr>
<td width="175" align="right" valign="middle"><?php echo $row_recSystem['gearName']; ?> <?php echo $row_recSystem['gearLength']; ?> </td>
<td width="175" align="left" valign="middle"><input name="numberRequired" type="text" id="numberRequired" onFocus="MM_displayStatusMsg('Optional: Enter the amount of Gear required');return document.MM_returnValue" size="10" maxlength="10" />
<input name="gearID" type="hidden" id="gearID" value="<?php echo $row_recSystem['gearID']; ?>" />
<input name="scaffoldID" type="hidden" id="scaffoldID" value="<?php echo $row_recScaffold['scaffoldID']; ?>" />
</td>
</tr>
<?php } while ($row_recSystem = mysql_fetch_assoc($recSystem)); ?>
Any advice on how to tackle this problem whould be much appreciated.