capture data from a drop list

0

Hello create a drop list that I have your items are in the database but at the time of submitting the form I do not capture the values I hope you can help me

            <% ResultSet rs = null; %>
        <%
            try {
                Class.forName("oracle.jdbc.OracleDriver");
                Connection con = DriverManager.getConnection("jdb:oracle:thin:@localhost:1521:XE ", "LUISASUAZA", "1234");
                Statement st = con.createStatement(
                        ResultSet.TYPE_SCROLL_INSENSITIVE,
                        ResultSet.CONCUR_READ_ONLY);
                rs = st.executeQuery("select PERFIL,ID_PERFIL from REGISTRO");

            } catch (Exception e) {
                out.println(e.toString());
            }
        
            while (rs.next()) {
                         
                    }
                        try {
                    %>
         <select  name="perfil_r" id="perfil_r" required="required"> 
          <%
                        rs.beforeFirst();
                        while (rs.next()) {

                    %>
                    <option>
                        <td align="center" value="<%=rs.getString("PERFIL")%>"><%=rs.getString("ID_PERFIL")%></td>
                        </option>
     <%
                            }
                        } catch (SQLException e) {
                            out.println(e.toString());
                        }

                    %>
         </select>
        
    
asked by luisa suaza 21.06.2018 в 21:27
source

0 answers