loginin.asp
来自「一个简单的注册登录系统。asp与access的简单结合。是网站建立的先行训练。」· ASP 代码 · 共 31 行
ASP
31 行
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="Inc/Conn.asp"-->
<!--#include file="Inc/md5.asp"-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
</head>
<body>
<%
pwd = request.form("pwd")
names = request.form("name")
Set rs = Server.CreateObject("ADODB.Connection")
sql = "select * from [User] where UserName='" & names & "' And PassWord='"&md5(pwd)&"'"
Set rs = conn.Execute(sql)
If Not rs.EOF = True Then
Session("Name") = rs("UserName")
Session("pwd") = rs("PassWord")
Session("Usertype") = rs("UserType")
response.Write ("登陆成功,你的身份是"&Session("Usertype"))
Else
response.Write("登陆失败,你的身份是游客!")
End If
%>
</body>
</html>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?