del_user.jsp
上传用户:xjrzjk
上传日期:2022-07-31
资源大小:1585k
文件大小:1k
- <%@ page contentType="text/html; charset=GBK" %>
- <%@ page import="java.sql.*"%>
- <%
- try{
- //数据库连接
- Class.forName("oracle.jdbc.driver.OracleDriver");
- String strUrl = "jdbc:oracle:thin:@slight:1521:LOCAL";
- String strUser = "eshop";
- String strPassword = "eshop";
- Connection con = DriverManager.getConnection(strUrl, strUser, strPassword);
- Statement st = con.createStatement();
- String strUserid = request.getParameter("USERID");
- if (strUserid != null){
- //删除指定用户
- String sql = "delete from RegUser where userid ='" + strUserid +"'";
- //out.println(sql);
- st.executeUpdate(sql);
- }
- %>
- <jsp:forward page="user_check.jsp" />
- <%
- }catch(Exception e){
- throw (e);
- }
- %>