📄 updateinfo.jsp
字号:
<%@page contentType="text/html"%><%@page pageEncoding="UTF-8"%><%@page import="java.sql.*"%><%--The taglib directive below imports the JSTL library. If you uncomment it,you must also add the JSTL library to the project. The Add Library... actionon Libraries node in Projects view can be used to add the JSTL 1.1 library.--%><%--<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> --%><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>网上银行</title> </head> <body background="D:/YJ/YJ1.23/NetBank/background/onpub07.gif"> <% String userName = (String)session.getAttribute("userName"); String userPassword = request.getParameter("userPassword"); String reUserPassword=request.getParameter("rePassword"); String servicePassword = request.getParameter("servicePassword"); String reServicePassword=request.getParameter("reServicePassword"); String address = request.getParameter("address"); String phone = request.getParameter("phone"); String mobile = request.getParameter("mobile"); String email = request.getParameter("email"); if(!userPassword.equals(reUserPassword)) { out.println("两次输入的登陆密码不一致,请重新输入"); %> <p align = "center"> <a href = "Show.html">修改成功</a> <% } else if(!servicePassword.equals(reServicePassword)) { out.println("两次输入的服务密码不一致,请重新输入"); %> <p align = "center"> 系统将在3秒内自动跳转,也可以点击下面的链接回到修改界面 <meta http-equiv="refresh" content="2; URL=AlterInfo.jsp"> <a href = "AlterInfo.jsp">回到修改界面</a> <% } else { String dbUrl = "jdbc:odbc:afei"; String user = "scott"; String password = "tiger"; try { Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); Connection conn = DriverManager.getConnection(dbUrl,user,password); CallableStatement proc = conn.prepareCall("{ call UpdateNetMember(?,?,?,?,?,?,?) }"); proc.setString(1, userName); proc.setString(2, userPassword); proc.setString(3,servicePassword); proc.setString(4,address); proc.setString(5,phone); proc.setString(6, mobile); proc.setString(7, email); proc.execute(); proc.close(); conn.close(); %> <p align = "center"> 祝贺您修改成功 <p align = "center"> 系统将在3秒内自动跳转,也可以点击下面的链接回到主界面 <meta http-equiv="refresh" content="2; URL=Show.html"> <a href = "Show.html">回到主界面</a> <% } catch(Exception connectException) { out.println(connectException); out.println("连接数据库失败,请联系管理员!"); } } %> </body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -