How to make the checkbox appear at the beginning of each line? Those. the meaning of this is that I have a table with contacts, I mark those that I want to delete and pass on these values ​​to the request to delete a contact from the database. The option below does not work.

<sql:query dataSource="${snapshot}" var="result"> SELECT * from users; </sql:query> <table border="1" width="100%"> <tr> <th>ID</th> <th>Last Name</th> <th>First Name</th> <th>Age</th> <th>Sex</th> <th>Phone number</th> </tr> <c:forEach var="row" items="${result.rows}"> <tr> <td><input type="checkbox" name="id" checked="" /></td> <td><c:out value="${row.id}"/></td> <td><c:out value="${row.last_name}"/></td> <td><c:out value="${row.name}"/></td> <td><c:out value="${row.age}"/></td> <td><c:out value="${row.sex}"/></td> <td><c:out value="${row.phone_number}"/></td> </tr> </c:forEach> </table> 
  • 2
    Try giving the checkbox the name "id []"
  • Thanks, it helped, but you can in more detail please, I want to understand. - fill
  • By the way, another way is possible stackoverflow.com/questions/1016272/… - carapuz

0