This is the code I have:
<table border="2">
<tr>
<th>CourseID</th>
<th>SectionNo</th>
<th>Add Info</th>
</tr>
<% while(rs.next()){ %>
<tr>
<FORM NAME="actionForm" action="ProfCourseUpdate" method='post'>
<td> <%=rs.getString("CourseID") %> </td>
<td> <%=rs.getInt("SectionNo") %> </td>
<td> <input type="submit" name="ProfCourseUpdate" value="Update Course Info"></td>
</FORM>
</tr>
<% } %>
</table>
I'm pulling information from a database and putting them into their respective columns in a table. So it looks like: |Course --- Section --- (Button)|
When I have a user click the submit button I want to be able to pass along the data from the entire row. I've tried hidden input in this way:
<td> <%=rs.getString("CourseID") %> </td><td><input type="hidden" name="Course" value="<%rs.getString("CourseID") %>"></td>
It just results in some strange table formatting and didn't work.