Hi everyone...
im new to this forum and also in web application using jsp-jstl.
im having problem passing data from a multilple check box lists.
here's my code:
<form method="post"><sql:query var="charge" dataSource="${datasource}">
SELECT chargeID, commodity FROM other_charges where charges_typeID = 1
</sql:query>
<span class="cell_content">Toiletries:</span><br />
<c:forEach var="row" items="${charge.rows}">
<input type="checkbox" name="toiletries" value="${row.commodity}" />${row.commodity}<br />
<input type="hidden" name="toiletID" value="${row.chargeID}" size="2" />
</c:forEach>
</form>
<c:if test="${pageContext.request.method=='POST'}">
<sql:query var="toilet" dataSource="${datasource}">
SELECT commodity FROM other_charges where chargeID = ${param.toiletID}
</sql:query>
<c:forEach var="row" items="${toilet.rows}">
${row.commodity}
</c:forEach>
</c:if>
I used the input text box to hold the id's of each data to pass when i click the submit button but the result appeared of my query after submission is just the first data that has been queried using foreach inside the form tag. need help guys.