ASP与ACCESS的登陆总是实现不了。怎么办?急用:

来源:百度知道 编辑:UC知道 时间:2024/05/31 07:58:51
登陆页面:
<html>
<center>
<form method="post"action="check3.asp">
<p>姓名:<input type="text"name="Name"size="10"></p>
<p>密码:<input type="Password"name="Password"size="10"></p>
<p><input type="submit" value="登陆">
<input type="reset" value="取消">
<a href="index.asp">注册
</a></p>
</form>
</center>
</html>

check3.asp页面:
<!-- #include file="conn.asp" -->
<%
dim username,userpwd
username=trim(replace(request("Name"),"'",""))
userpwd=trim(Request.Form("Password"))
if username="" then
%>
<script language=javascript>
alert( "错误:请输入管理帐号!" );

你的密码不错才怪的。
你看看你check3.asp着个页面 的有一段着个
<%elseif md5(userpwd)<>rs("userpwd") then%>
你的MD5文件呢?
好象没有包含进来把啊。。。

你把着一段<%elseif md5(userpwd)<>rs("userpwd") then%>
给改成<%elseif userpwd<>rs("userpwd") then%>
试试看。
要不你也可以在
<!include file="coon.asp">下面加个
<!--#incude file="md5.asp"-->
前提是有着个文件。
建议你用MD5加密。

rs.Open ="Select * Form t_user where d_user='"&username&"' and d_pass='"&userpwd&"'"

登录页面 index.htm
<html>
<center>
<form method="post"action="check3.asp">
<p>姓名:
<input name="name" type="text" id="name">
</p>
<p>密码:
<input name="pass" type="text" id="pass">
</p>
<p><input type=&q