📄 updatetea_confirm.jsp
字号:
<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="errorpage.jsp" %>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
</head>
<jsp:useBean id="teacher" scope="page" class="stu.teacher"/>
<jsp:useBean id="sqlB" scope="request" class="stu.sqlBean"/>
<body bgcolor="#4692B3" text="#FFFFFF" link="#66FF00">
<p align="center">
<%
try{
String id=(String)session.getAttribute("id");
String name=new String(request.getParameter("name").getBytes("iso8859_1"),"gbk");
String password=request.getParameter("password");
String title=new String(request.getParameter("title").getBytes("iso8859_1"),"gbk");
if(name==null || name.equals("")) throw new Exception("错误,教师姓名不能为空!!");
if(password==null || password.equals("")) throw new Exception("错误,密码不能为空!!");
out.print("教师号: "+id+"<br>");
out.print("教师姓名为: "+name+"<br>");
out.print("职称: "+title+"<br>");
out.print("密码: "+password+"<br>");
String sql= "update teacher set name='"+name+"', "+"title='"+title+"' ,password='"+password+"' "+ "where id='"+id+"' "; sqlB.executeInsert(sql);
}catch (Exception e){out.print(e.toString());}
%>
</p>
<p> </p>
<p><a href="updatetea.jsp"><<Back</a></p>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -