?? shanchumingdan_confirm.jsp
字號:
<%@ page contentType="text/html; charset=gb2312" %>
<%@ page language="java" import="java.sql.*" %>
<html>
<head>
<title>刪除教師名單</title>
</head>
<body>
<jsp:useBean id="ss" scope="page" class="xyf.bean"/>
<%
Object D=session.getAttribute("Aid");
if (D==null){
out.print("對不起,你還沒登陸,請先登陸<a href=denglu.jsp>首頁</a>");
}
else
{
String id=request.getParameter("id");
String sql="select * from teacher";
int i=-1;
ResultSet rs=ss.executeQuery(sql);
while(rs.next()){
String name=rs.getString("id");
if(id.equals(name))
i=1;
}
if(i==1){
out.println("刪除教師名單成功 <a href=guanliyuanjiemian.jsp>返回</a>");
String sql1="delete from teacher where id='"+id+"'";
ss.executeUpdate(sql1);
}
else {
out.println("該用戶不存在,請重新輸入<a href=shanchumingdan.jsp>返回</a>");
}
}
%>
</body>
</html>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -