📄 landuser.jsp
字号:
<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>查看帖子信息</title>
<link href="css/style.css" type="text/css" rel="stylesheet">
</head>
<jsp:useBean id="connection" scope="request" class="com.JDBConnection"/>
<%
request.setCharacterEncoding("gb2312");
String account=request.getParameter("UID");
String password=request.getParameter("PWD");
String sql="select * from tb_forumUser where account='"+account+"' and userRight=1";
ResultSet rs=connection.executeQuery(sql);
String result="您输入的账号和密码不正确";
try{
while(rs.next()){
if(password.equals(rs.getString("password"))){
result="非常感谢,欢迎回来:"+account+"";
session.setAttribute("account",account);
session.setAttribute("right","1");
}
}
}catch(Exception e){
}
connection.closeConnection();
%>
<body>
<br><br><br>
<table width="289" border="0" align="center" cellpadding="0" cellspacing="0" background="image/registerDealwith.jpg">
<tr>
<td height="34"> <font color="#FFFFFF">≡ 登录结果 ≡</font> </td>
</tr>
<tr align="center">
<td height="206">
<p><b><font color="#FF0000"><%=result%></font></b></p>
<meta http-equiv="refresh" content="5;URL=index.jsp">
<p><a href="index.jsp">(如果您的浏览器无法自动跳转,请点击这里。)</a></p></td>
</tr>
</table>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -