echo $options; ?> '; cell2.appendChild(oneInst); } </script> <table id="instructorsList"> <?php if ($courseInstResultSet != null && mysql_num_rows($courseInstResultSet) > 0) { $instOrder = 0; echo "<tbody>"; while ($row = mysql_fetch_array($courseInstResultSet, MYSQL_NUM)) { echo "<tr>"; echo '<td><input type="checkbox" ></td>'; echo '<td><select id="InstructorCourse' . $instOrder . '" name="data[course][instructor][' . $instOrder . ']">'; $selectedInstOptions = $iseries->createInstOptionsSelected($row[0]); echo $selectedInstOptions; echo '</select></td>'; echo "</tr>"; $instOrder++; } echo "</tbody>"; } ?> </table> <input type="button" onclick="addInstructor('instructorsList')" value="Add Instructor" /> <input type="button" onclick="removeElement('instructorsList')" value="Remove Instructor" /> <!-- show option for profs and remove them if not needed --> </div> <br /> <input type="submit" value="Save" /><br />