news_edit_operate.jsp
上传用户:zdly666
上传日期:2022-08-09
资源大小:6511k
文件大小:1k
源码类别:

WEB源码(ASP,PHP,...)

开发平台:

JavaScript

  1. <%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %>
  2. <%@page import="java.util.Date"%>
  3. <%@page import="java.util.*"%>
  4. <%@page import="java.text.*"%>
  5. <%@ include file="conn.jsp" %>
  6. <%
  7. String idz=new String(request.getParameter("id").getBytes("ISO-8859-1"));
  8. String author=new String(request.getParameter("author").getBytes("ISO-8859-1"));
  9. String art_headline=new String(request.getParameter("art_headline").getBytes("ISO-8859-1"));
  10. String art_content=new String(request.getParameter("art_content").getBytes("ISO-8859-1"));
  11. int art_id=Integer.parseInt(idz);
  12. String condition="update art set author='"+author+"',art_headline='"+art_headline+"',art_content='"+art_content+"'where art_id="+art_id;
  13. stmt.executeUpdate(condition);
  14. stmt.close();
  15. conn.close();
  16. response.sendRedirect("news_all.jsp");            
  17. %>