Thanks Bradgrafelman,
I don't think there was any point in that statement so I have removed it. I did specify a name for the INPUT element.
I however do not know how to proceed with the part of creating the associative array.
Second, you need to somehow associate the data entered in each field with the name it corresponds to. One way to do that would be name the fields like tab[Jack], e.g. place the name inside of square brackets at the end of the field name. That way, $_POST['tab'] would be an associative array - one you could then use a [man]foreach[/man] loop to process and update your SQL table.
If anyone can elaborate on that with an example, i would greatly appreciate it. The current state of the code is:
<form action="tsa.php" method="post">
<table class="stable">
<thead>
<tr><th>Student Name</th><th>Table</th></tr>
</thead>
<tbody>
<?php foreach ($students as $student): ?>
<tr>
<td><?php echo ($student['name']); ?></td>
<td><input type="text" name="tabl" value="<?php echo ($student['tabl']); ?>"></td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
<p>
<input type="submit" name="action" value="apply"/>
</p>
</form>
Thanks again for your help.
RCR.
Second, you need to somehow associate the data entered in each field with the name it corresponds to. One way to do that would be name the fields like tab[Jack], e.g. place the name inside of square brackets at the end of the field name. That way, $_POST['tab'] would be an associative array - one you could then use a [man]foreach[/man] loop to process and update your SQL table.[/QUOTE]