add_kc.jsp~14~
资源名称:JSP02.rar [点击查看]
上传用户:top0756
上传日期:2022-08-11
资源大小:6501k
文件大小:1k
源码类别:
Jsp/Servlet
开发平台:
VBScript
- <%@page contentType="text/html; charset=gb2312"%>
- <%@ page import="java.sql.*" %>
- <%@ page import="proj112.*" %>
- <%@ page import="proj112.DataFormat" %>
- <jsp:useBean id="a" scope="page" class="proj112.dbconn"/>
- <html>
- <body>
- <%
- String kechenghao = DataFormat.convert(request.getParameter("kechenghao"));
- String kechengming = DataFormat.convert(request.getParameter("kechengming"));
- String renkejiaoshi = DataFormat.convert(request.getParameter("renkejiaoshi"));
- String xingqiji = DataFormat.convert(request.getParameter("xingqiji"));
- //int age = Integer.parseInt(request.getParameter("age"));
- String shijian = DataFormat.convert(request.getParameter("shijian"));
- String shangkejiaoshi = DataFormat.convert(request.getParameter("shangkejiaoshi"));
- %>
- <%
- /*
- out.print(num);
- out.print(name);
- out.print(pwd);
- out.print(addr);
- out.print(age);
- out.print(br);*/
- int result = a.executeUpdate("insert into kecheng(kechenghao,kechengming,renkejiaoshi,xingqiji,shijian,shangkejiaoshi) values('"+kechenghao+"','"+kechengming+"', '"+renkejiaoshi+"', '"+xingqiji+"', '"+shijian+"', '"+shangkejiaoshi+"' )");
- //int result = add.executeUpdate("insert into std(num,UserName,PassWord,addr,age,bedroom) values('222', '4', '546', 'asdf', 5, 'r')");
- %>
- <% response.sendRedirect("list_kecheng.jsp");
- //out.print("插入成功!");
- %>
- </body>
- </html>