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

Jsp/Servlet

开发平台:

VBScript

  1. <%@ page contentType="text/html; charset=GB2312" %>
  2. <%@ page import = "java.sql.*"%>
  3. <%@ page language = "java"%>
  4. <%@ page import = "proj112.ISOtoGb2312"%>
  5. <HTML>
  6. <HEAD>
  7. <TITLE>update</TITLE>
  8. </HEAD>
  9. <body text="#808080" link="#FF99CC" vlink="#FF8080" alink="#FF99CC" topmargin="0" leftmargin="0"><style>
  10. <!--
  11. BODY {SCROLLBAR-FACE-COLOR: #FFFFFF; SCROLLBAR-HIGHLIGHT-COLOR: #FFFFFF; SCROLLBAR-SHADOW-COLOR: #FFFFFF; SCROLLBAR-3DLIGHT-COLOR: #FFFFFF; SCROLLBAR-ARROW-COLOR:  #FFAAAA; SCROLLBAR-TRACK-COLOR: #FFFFFF; SCROLLBAR-DARKSHADOW-COLOR: #FFFFFF; }
  12. -->
  13. </style>
  14. <%
  15. String stu_id=ISOtoGb2312.convert(request.getParameter("stu_id"));
  16. String name=ISOtoGb2312.convert(request.getParameter("name"));
  17. String sex=ISOtoGb2312.convert(request.getParameter("sex"));
  18. String age=ISOtoGb2312.convert(request.getParameter("age"));
  19. String dept=ISOtoGb2312.convert(request.getParameter("dept"));
  20. String ruxdate=ISOtoGb2312.convert(request.getParameter("ruxdate"));
  21. String tel=ISOtoGb2312.convert(request.getParameter("tel"));
  22. String address=ISOtoGb2312.convert(request.getParameter("address"));
  23. Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); //载入驱动程序类别
  24. Connection con = DriverManager.getConnection("jdbc:odbc:dsn112"); //建立数据库链接
  25. Statement stmt = con.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,
  26. ResultSet.CONCUR_READ_ONLY);
  27. String strsql;
  28. strsql="update Info set name ='"+name+"',sex ='"+sex+"',age ='"+age+"',dept ='"+dept+"',ruxdate ='"+ruxdate+"',tel ='"+tel+"',address ='"+address+"' where stu_id ='"+stu_id+"'";
  29. stmt.executeUpdate(strsql);
  30. %>
  31. <br><br><br><br>
  32.  <table  width="100%" cellspacing="0" cellpadding="4" rules="all" bordercolor="#CC9966" border="1" id="dg_rxkb" style="background-color:White;border-color:#CC9966;border-width:1px;border-style:None;width:99%;border-collapse:collapse;">
  33.   <tr>
  34.     <td align="center"><h3>你修改了的密码如下:</td>
  35.   </tr>
  36.  <tr>
  37.     <td height="30">&nbsp;&nbsp;&nbsp;&nbsp;用户名:<%=name%></td>
  38.   </tr>
  39.   <tr>
  40.     <td>&nbsp;&nbsp;&nbsp;&nbsp;性别:<%=sex%></td>
  41.   </tr>
  42.   <tr>
  43.     <td>&nbsp;&nbsp;&nbsp;&nbsp;年龄:<%=age%></td>
  44.   </tr>
  45.   <tr>
  46.     <td>&nbsp;&nbsp;&nbsp;&nbsp;专业:<%=dept%></td>
  47.   </tr>
  48.   <tr>
  49.     <td>&nbsp;&nbsp;&nbsp;&nbsp;入学时间:<%=ruxdate%></td>
  50.   </tr>
  51.   <tr>
  52.     <td>&nbsp;&nbsp;&nbsp;&nbsp;联系方式:<%=address%></td>
  53.   </tr>
  54.   <tr>
  55.     <td  align="center">&nbsp;&nbsp;&nbsp;&nbsp;<a href="update_stu.jsp">返回</a></td>
  56.   </tr>
  57. </table>
  58. <TABLE border="0" width="90%" align="center">
  59.        <tr>
  60.          <td height="10"></td>
  61.        </tr>
  62.        <tr>
  63.          <td align="center"></td>
  64.        </tr>
  65.        <tr>
  66.          <td height="10"></td>
  67.        </tr>
  68. </table>
  69. </BODY>
  70. </HTML>