delete_course.jsp
上传用户:top0756
上传日期:2022-08-11
资源大小:6501k
文件大小:1k
源码类别:

Jsp/Servlet

开发平台:

VBScript

  1. <%@ page contentType="text/html; charset=GBK" %>
  2. <%@ page import="java.sql.*" %>
  3. <%@ page language="java" %>
  4. <%@ page import="java.util.*" %>
  5. <%@ page import="proj112.*" %>
  6. <jsp:useBean id="a" scope="page" class="proj112.dbconn"/>
  7. <html>
  8. <body>
  9. <%
  10. request.setCharacterEncoding("GBK");
  11. String sql = null;
  12. try{
  13. String id2=request.getParameter("id");
  14. sql = "DELETE FROM  chengji WHERE kch='"+id2+"'";
  15. a.executeUpdate(sql);
  16. response.sendRedirect("course.jsp");
  17. }
  18. catch(Exception e){
  19. out.println("错误信息:"+e.getMessage());
  20. }
  21. %>
  22. </body>
  23. </html>