1个回答
展开全部
Set rs = Server.CreateObject("Adodb.RecordSet")
Sql = "Select * From admin where admin_name='"&p_adminname&"' And admin_pass='"&p_adminpass&"'"
rs.Open Sql,Conn,1,3
If rs.Bof Then
%>
<script language=javascript>
alert("无效的用户名或密码!");
location.href = "javascript:history.back()";
</script>
<%
Else
session("admin_name") = rs("admin_name")
session("admin_bm") = rs("admin_bm")
session("admin_lm")=rs("admin_lm")
Response.redirect "admin_index.asp"
rs.Close
Set rs = Nothing
End if
End if
%>
Sql = "Select * From admin where admin_name='"&p_adminname&"' And admin_pass='"&p_adminpass&"'"
rs.Open Sql,Conn,1,3
If rs.Bof Then
%>
<script language=javascript>
alert("无效的用户名或密码!");
location.href = "javascript:history.back()";
</script>
<%
Else
session("admin_name") = rs("admin_name")
session("admin_bm") = rs("admin_bm")
session("admin_lm")=rs("admin_lm")
Response.redirect "admin_index.asp"
rs.Close
Set rs = Nothing
End if
End if
%>
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询