日期:2014-05-17 浏览次数:20674 次
<html> <head> <title>录入数据</title> </head> <body> <% try{ request.setCharacterEncoding("utf-8"); String insert = "insert into news(num,theme,author,date) values('"+request.getParameter("num")+"','"+request.getParameter("theme")+"','"+request.getParameter("author")+"','"+request.getParameter("date")+"')"; if(null != request.getParameter("num") && !"".equals(request.getParameter("num")) ) { myDBbean.update(insert); } } catch(Exception ex){ ex.printStackTrace(); } finally{ myDBbean.close(); } %>