| 编程中国 | 业界新闻 | 技术文章 | 视频教程 | 下载频道 | 程序源码 | 个人空间 | 编程论坛
全能ASP/PHP/ASP.NET主机,支持月付专业 MSSQL 数据库空间,支持月付专业 MySQL 数据库空间,支持月付赛孚耐:软件保护加密专家
身份认证令牌USB KEY   
共有 215 人关注过本帖
标题:[求助]登陆验证时出现的错误提示
收藏  订阅  推荐  打印 
fashlove
Rank: 1
等级:新手上路
帖子:7
积分:170
注册:2007-10-26
[求助]登陆验证时出现的错误提示

这个是我的check.asp文件,如下所示。在我运行的时候,它出现的错误是跳出一“对不起,密码不正确,请重新输入”的对话框,但是我输入的用户名和密码都是数据库表里边的,怎么会出现密码错误呢?请高手帮我看一下原因。我找了好长时间都没找出错在哪里。请帮帮忙
<%@LANGUAGE="VBSCRIPT"%>
<!--#include file="conn.asp"-->
<%
dim uid,upwd
uid=trim(Request.Form("txt_id"))
upwd=trim(Request.Form("txt_pwd"))
if uid="" then
response.write "<script>alert('对不起,用户名不能为空!');document.location.href='index.htm';</script>"
else if upwd="" then
response.write "<script>alet('对不起,密码不能为空!');document.location.href='index.htm';</script>"
response.end
end if
set rs=server.createobject("ADODB.recordset")
sql="select * from denglu where id='"&uid&"'"
rs.open sql,conn,1,1
%>
<%
if not rs.eof then
if rs("pwd")<>upwd then
response.write "<script>alert('对不起,密码不正确,请重新输入');document.location.href='index.htm';</script>"
response.end
else
session("user")=uid
response.redirect "main.asp"
flag="loginok"
end if
else
response.write "<script>alert('对不起,你的用户名不存在,请与管理员联系!');document.location.href='admin_index.asp';</script>"
response.end
end if
end if
%>

2007-11-20 09:05
关于我们 | 广告合作 | 编程中国 | 清除Cookies | Archiver | WAP | TOP

编程中国 版权所有,并保留所有权利。鲁ICP备08000592号
Powered by Discuz, Processed in 0.061314 second(s), 9 queries.
Copyright©2004-2008, BCCN.NET, All Rights Reserved