login.asp

来自「图书管理功能」· ASP 代码 · 共 29 行

ASP
29
字号
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
</head>

<body>
   <%
   dim dbcon,uname,upass,strsql,rs
   uname=request.form("uname")
   upass=request.form("upass")
   set dbcon=server.createobject("adodb.connection")
   dbcon.open "dsn=ourdb;uid=sa;password=;"
   strsql="select * from login where unanme='"&uname&"' and pass='"&upass&"'"
   set rs=dbcon.execute(strsql)
   if(rs.eof) then
    response.write("<font color=red>用户名称或密码错误!!</font>")
	response.write("<a href=ulogin.asp>请重新登陆</a>")
	else
	 response.redirect("bookmain.html")
	 end if
	 rs.close
	 dbcon.close
   
	 %>
</body>
</html>

⌨️ 快捷键说明

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