Ok, so I've got myself lost on what I need to do here and I'm reaching out for help. I have two while loops, one that generates a list of courses and then one that generate a list of units for those courses. On my units I have an input box. I don't know how to update the table based on which input box was filled out for the class and what unit of the class. I'm pretty sure that I would use an array, but I'm just lost at this point. Please help.
<?php
$course_set1 = mssql_query("SELECT crs_id, crs_name, crs_author FROM SNP_crs where pro_id = '{$program}'", $connection);
while ($course1 = mssql_fetch_array($course_set1)){
echo "
<tr>
<td colspan=\"16\">{$course1['crs_name']} - {$course1['crs_author']}</td></tr>
<tr>
<td>Unit</td><td>Unit Title</td><td>Record Date</td><td>Edit A/V</td>
<td>Send for Transcript</td><td>Rec'd Transcript</td><td>Mapped</td>
<td>Designer</td><td>QC Check</td><td>Bounced</td><td>Published</td>
<td>QC Check</td><td>Read</td><td>Attend</td><td>Complete</td><td>Discuss</td>
</tr>";
$course_set = mssql_query("SELECT * FROM SNP_crsunits WHERE crs_id = '{$course1['crs_id']}'", $connection);
while ($course = mssql_fetch_array($course_set)) {
echo "
<tr>
<td>{$course['unit']}</td>
<td> <input type=\"text\" name=\"unit\" value=\"{$course['unit_title']}\" /></td>
<td> </td>
<td> " . str_replace("1", "X", ($course['edit_av'])) . " </td>
<td> " . str_replace("1", "X", ($course['sd_transc'])) . "</td>
<td> " . str_replace("1", "X", ($course['rd_transc'])) . "</td>
<td> " . str_replace("1", "X", ($course['mapped'])) . "</td>
<td> " . str_replace("1", "X", ($course['designer'])) . "</td>
<td> " . str_replace("1", "X", ($course['qc_check'])) . "</td>
<td> " . str_replace("1", "X", ($course['bounced'])) . "</td>
<td> " . str_replace("1", "X", ($course['published'])) . "</td>
<td> " . str_replace("1", "X", ($course['qc_check2'])) . "</td>
<td> " . str_replace("1", "X", ($course['read'])) . "</td>
<td> " . str_replace("1", "X", ($course['attend'])) . "</td>
<td> " . str_replace("1", "X", ($course['complete'])) . "</td>
<td> " . str_replace("1", "X", ($course['discuss'])) . "</td>
</tr>
";
} echo "<tr><td colspan=\"16\"> </td></tr>";
};
?>