ASP后台登录问题,高手请进
<!--#includefile="Conn.asp"--><%ifRequest.QueryString("no")<>"eshop"then%><html><head...
<!--#include file="Conn.asp"-->
<%if Request.QueryString("no")<>"eshop" then%>
<html>
<head>
<title>企业网站后台管理系统</title>
<meta name="Author" content="yfzl">
<meta name="Contact" content="gzyfzl2006@163.com">
<meta name="Copyright" content="gzyfzl.com">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="Inc/ManageMent.css" rel="stylesheet" type="text/css">
</head>
<body>
<FORM ACTION="Login.asp?no=eshop" METHOD="post">
<br>
<center>
<table width="300" border="0" cellpadding="0" cellspacing="2" class="HeaderTdStyle">
<tr>
<td height="30" colspan="2" align="center"> <b>企业网站后台管理系统登陆</b> </td>
</tr>
<tr>
<td height="30" align="right">管理帐号:</td>
<td>
<input name="Name" size=12 maxlength="20"
>
</td>
</tr>
<tr>
<td height="30" align="right">管理密码:</td>
<td>
<input name="Pwd" type="password" size=12 maxlength="20">
</td>
</tr>
<tr>
<td height="30" colspan="2" align="center">
<input name="Submit" type="submit" value="登陆系统">
</td>
</tr>
</table>
<p> Design By anew</p>
</center>
</form>
</body>
</html>
<%else%>
<%
pwd = request.form("pwd")
name = request.form("name")
Set rs = Server.CreateObject("ADODB.Connection")
sql = "select * from Manage_User where UserName='" & name & "' And PassWord='"&encrypt(pwd)&"'"
Set rs = conn.Execute(sql)
If Not rs.EOF = True Then
Session("Name") = rs("UserName")
Session("pwd") = rs("PassWord")
Response.Redirect("Manage.asp")
Else
Response.Redirect "Loginsb.asp?msg=您输入了错误的帐号或口令,请再次输入!"
End If
end if
%>
密码登录的时候总是说密码或帐号不正确,不知道是哪里出了问题,请高手看看 展开
<%if Request.QueryString("no")<>"eshop" then%>
<html>
<head>
<title>企业网站后台管理系统</title>
<meta name="Author" content="yfzl">
<meta name="Contact" content="gzyfzl2006@163.com">
<meta name="Copyright" content="gzyfzl.com">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="Inc/ManageMent.css" rel="stylesheet" type="text/css">
</head>
<body>
<FORM ACTION="Login.asp?no=eshop" METHOD="post">
<br>
<center>
<table width="300" border="0" cellpadding="0" cellspacing="2" class="HeaderTdStyle">
<tr>
<td height="30" colspan="2" align="center"> <b>企业网站后台管理系统登陆</b> </td>
</tr>
<tr>
<td height="30" align="right">管理帐号:</td>
<td>
<input name="Name" size=12 maxlength="20"
>
</td>
</tr>
<tr>
<td height="30" align="right">管理密码:</td>
<td>
<input name="Pwd" type="password" size=12 maxlength="20">
</td>
</tr>
<tr>
<td height="30" colspan="2" align="center">
<input name="Submit" type="submit" value="登陆系统">
</td>
</tr>
</table>
<p> Design By anew</p>
</center>
</form>
</body>
</html>
<%else%>
<%
pwd = request.form("pwd")
name = request.form("name")
Set rs = Server.CreateObject("ADODB.Connection")
sql = "select * from Manage_User where UserName='" & name & "' And PassWord='"&encrypt(pwd)&"'"
Set rs = conn.Execute(sql)
If Not rs.EOF = True Then
Session("Name") = rs("UserName")
Session("pwd") = rs("PassWord")
Response.Redirect("Manage.asp")
Else
Response.Redirect "Loginsb.asp?msg=您输入了错误的帐号或口令,请再次输入!"
End If
end if
%>
密码登录的时候总是说密码或帐号不正确,不知道是哪里出了问题,请高手看看 展开
2个回答
展开全部
找不到错的,帮你整理了一下,应该是下边的问题:
<%
pwd = request.form("Pwd")
username = request.form("Name")
set rs=conn.execute("select * from Manage_User where UserName='"&username&"' and PassWord='"&encrypt(pwd)&"'")
if Not rs.Eof Then
Session("Name") = rs("UserName")
Session("pwd") = rs("PassWord")
Response.Redirect("Manage.asp")
Else
Response.Redirect "Loginsb.asp?msg=您输入了错误的帐号或口令,请再次输入!"
End if
End if
%>
<%
pwd = request.form("Pwd")
username = request.form("Name")
set rs=conn.execute("select * from Manage_User where UserName='"&username&"' and PassWord='"&encrypt(pwd)&"'")
if Not rs.Eof Then
Session("Name") = rs("UserName")
Session("pwd") = rs("PassWord")
Response.Redirect("Manage.asp")
Else
Response.Redirect "Loginsb.asp?msg=您输入了错误的帐号或口令,请再次输入!"
End if
End if
%>
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询