是否有任何方法可以在另一個jsp頁面中以jsp形式顯示數據,例如,在“管理”面板中顯示“注冊”表單的數據,而無需將數據發送到數據庫。但是注冊后頁面無法重定向到管理面板。index.jsp <form action="" method="POST"> <input class="input-field" type="text" placeholder="Name" name="name" id="name"> <select class="custom-select-md" id="uni_select"> <option selected>Select your university</option> <% try { Connection conn = DBConnect.connect(); String sql = "SELECT * FROM universities"; Statement st = conn.createStatement(); ResultSet rs = st.executeQuery(sql); while (rs.next()) { %> <option value="<%=rs.getString("id")%>"><%=rs.getString("uni_name")%></option> <% } } catch (Exception e) { System.out.println("Error " + e.getMessage()); } %> </select> <input class="input-field" type="text" placeholder="University ID number" name="index" id="index"> <input class="input-field" type="text" placeholder="Email" name="mail" id="mail"> <input type="submit" class="btnR btn btn-dark btn-block" name="s_reg" value="Register as a Student" id="regStu"/></form>我想在管理面板上顯示名稱,大學名稱,ID號和電子郵件,而無需將此數據發送到數據庫。在管理員批準數據后,他將這些數據輸入數據庫。
添加回答
舉報
0/150
提交
取消