login.asp

来自「在 要要要在在 要要要在在 要要要在在 要要要在在 要要要在在 要要要在在 要要」· ASP 代码 · 共 32 行

ASP
32
字号
<!--#include file="conn.asp"-->
<%
passcode=Cint(request.form("passcode"))
Customer=request.Form("Customer")
Password=request.Form("Password")
if Customer="" then
response.Write "<script LANGUAGE='javascript'>alert('用户名不能为空!');history.go(-1);</script>"
response.end
end if
if Password="" then
response.Write "<script LANGUAGE='javascript'>alert('密码不能为空!');history.go(-1);</script>"
response.end
end if
sql="select * from user where Customer='"&Customer&"' and Password='"&Password&"'"
set rs=server.CreateObject("adodb.recordset")
rs.open sql,conn,1,1
if  Password<>rs("Password") then
response.Write "<script LANGUAGE='javascript'>alert('密码错误请重新输入');history.go(-1);</script>"
response.end
end if
session("Customer")=Customer
session("Password")=Password
%>
<html>
<head>
<meta http-equiv="refresh" content="0; url=index.asp">
<title>无标题文档</title>
</head>

<body>
</body>
</html>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?