asp简单的用户登陆代码

作者:袖梨 2022-07-02

asp简单的用户登陆代码

<%
username=replace(request.form("username"),"'","''")
password=replace(request.form("password"),"'","''")
sql="select * from admin where(username='"&username&"' and password='"&password&"')"
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,1
if not rs.eof then
rs.close
conn.close
session("check")="checked"
response.Redirect "index.asp"
else
session("check")=""
response.write ("对不起,帐号或密码错误,请返回重新输入!")
end if
%>


返回重新登陆

相关文章

精彩推荐