⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 login.asp

📁 集合了学习asp的100个实例
💻 ASP
字号:
<%@language=vbscript%>

<%response.buffer=true%>

<html>

<body bgcolor=#c1f7d8>

<center>

<%

dim strname,strpassword,sql

strname=request.form("Name")

strpassword=request.form("password")

sql="select * from user where username='" & strname & "'"

if strname="" then

  response.write "帐号不能为空<p></p>"

%>

<a href=javascript:history.back()>上一页</a>

<%

  response.end

end if

if strpassword="" then

  response.write "密码不能为空<p></p>"

%>

<a href=javascript:history.back()>上一页</a>

<%

  response.end

end if

set rstemp=server.createobject("adodb.recordset")

rstemp.open sql,"dsn=bbs;uid=feng;pwd=feng"

if rstemp.RecordCount=1 then

  if rstemp("userpassword")= strpassword then

  session("name")=strname

  response.redirect "user.htm"

  else

  response.write "密码错误<br><br>"

  end if

else

  response.write "帐号错误<br><br>"

%>

<a href=javascript:history.bakc()>上一页</a>

<%

  response.end

end if

rstemp.close

set rstemp=nothing

%>

</body>

</html>



⌨️ 快捷键说明

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