📄 login.asp
字号:
<!-- #include file="conn.asp" -->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>贴吧会员登录</title>
<link href="css/index.css" rel="stylesheet" type="text/css">
</head>
<body>
<table width="50%" border="1" align="center" cellspacing="0" bordercolor="#99CCFF">
<tr>
<td align="center" bgcolor="#99CCFF">贴吧会员登录 </td>
</tr>
<tr>
<td>
<form name="form1" method="post" action="login.asp?ac=1&burl=<%=request.servervariables("HTTP_REFERER")%>">
<table width="50%" border="0" align="center">
<tr>
<td width="29%">用户名:</td>
<td width="71%"><input name="username" type="text" size="15">
</td>
</tr>
<tr>
<td>密码:</td>
<td><input name="password" type="password" size="15"></td>
</tr>
<tr>
<td> </td>
<td><input type="submit" name="Submit" value="提交">
<input type="reset" name="Submit" value="重置"></td>
</tr>
</table>
</form>
</td>
</tr>
<tr>
<td bordercolor="#99CCFF" bgcolor="#99CCFF" > </td>
</tr>
</table>
<%
if request.QueryString("ac")=1 then
username=request.Form("username")
password=request.Form("password")
burl=request.QueryString("burl")
set rs=server.createobject("adodb.recordset")
sql="select * from users where username = '"& username &"'"
rs.open sql,conn,1,1
if rs.eof=false then
if strcomp(rs("password"),password)=0 then
session("username")=username
session("ql")=rs("tiebaname")
response.Redirect(burl)
end if
rs.close
set rs=nothing
else
response.Write("用户不存在!")
end if
end if
%>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -