stuchk.asp
来自「可以进行智能出卷,在线测试和在线评价,界面友好,适合广大教学用户使用」· ASP 代码 · 共 32 行
ASP
32 行
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
</head>
<body>
<center><h2>考试系统</h2></center>
<hr>
<%
session("name")=logname
session("password")=logpassword
logname=trim(request("name"))
logpassword=trim(request("password"))
regname=session("name")
regpassword=session("password")
Set conn=Server.CreateObject("ADODB.Connection")
conn.open "Driver={Microsoft Access Driver (*.mdb)};DBQ="& server.MapPath("data/students.mdb")
set rs=server.CreateObject("ADODB.Recordset")
sql="select name from studentrser where name='"&logname&"'"
sql="select password from admin where password='"&logpassword&"'"
rs.open sql,conn
if rs.eof then
response.write "密码不正确请重新登陆"&logname
response.write "<a href=adminlogin.asp> 返回</a>"
else
response.redirect "admin.asp"
end if
%>
</body>
</html>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?