I have populated my dropdown menu using the database and I want to get the value of the option that the user will be selecting.
For example I have a dropdown menu with different usernames (1002,1003,1004) and if the user select 1003 then I want to get that id and redirect according to the id.
<form action="record.jsp" method="POST">
<select name="">
<sql:setDataSource var="con"
driver="org.apache.derby.jdbc.ClientDriver" url="jdbc:derby://localhost:1527/dbechannel"
user="inuri" password="inuri" />
<sql:query var="h" scope="session" dataSource="${con}">
<%--setting the datasource value // --%>
SELECT * FROM USERPROFILE where usertype='user'
</sql:query>
<c:forEach var="i" items="${h.rows}">
<option></option>
<option> ${i.username}
</c:forEach>
</option>
</br>
<input type="submit" value="Search User" />
</select>
</form>
please help if anyone knows how to get the result of this drop down menu to a variable