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

📄 check.asp

📁 ASP+SQL Server动态网站开发从基础到实践教程
💻 ASP
字号:
<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>检查用户名</title>
</head>
<%
Dim ConnStr,myConn,mySQL

myID=request.form("uid")
myPWD=request.form("pwd")

if myID<>"" then
ConnStr="Provider=microsoft.jet.oledb.4.0;data source=" & server.mappath("../../accessDB/masterasp.mdb") 
Set myConn=Server.CreateObject ("ADODB.Connection")
Myconn. ConnectionString=ConnStr
myConn.open  '直接打开数据库连接

'查询该ID是否存在
mySQL="select * from register where UserID='" & myID & "' and UserPWD='" & myPWD & "'"

set myRes=myConn.execute(mySQL) 
	
if myRes.bof and myRes.eof then
	response.write "用户名或者密码错误!"
	
%>
<!-- #include file="login.asp" -->

<%
else
	response.write "你已经成功登录!"
end if
end if

%>
<body>
</body>

</html>

⌨️ 快捷键说明

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