标题:新手求助登陆问题!
只看楼主
winthesky
Rank: 1
等 级:新手上路
帖 子:1
专家分:0
注 册:2006-5-8
 问题点数:0 回复次数:3 
新手求助登陆问题!

是关于用户登陆的~!为什么我的登陆系统不用输入用户名和密码直接输入地址就可以进入到正常登陆才能进入的usercenter.asp这个页面?

以下是chklogin.asp源代码:

<!--#include file=conn.asp-->
<%number1=request.form("number")
if number1="" then
response.redirect "error.asp?id=012"
response.end
end if
if request.form("passwd")="" then
response.redirect "error.asp?id=013"
response.end
end if
dim rs

PassWd1=request.form("PassWd")
set rs=server.CreateObject("ADODB.RecordSet")
rs.open "select * from admin1 where number="&number1&"",conn,1,1
if rs.eof then
response.redirect "error.asp?id=055"
response.end
end if
if passwd1<>rs("passwd") then
response.redirect "error.asp?id=031"
response.end
else
session("number")=RS("number")
session("Passwd")=rs("Passwd")
session("IsLogin")="ok"
response.redirect "usercenter.asp"
end if
rs.close
%>

而且在我的usercenter.asp里也加了
<%
if session("IsLogin")<>"ok" then '没有登陆
end if
%>


高手解释一下这是为什么啊?为这个问题痛苦了一天,希望好心人能帮帮我!QQ:4387163 全天在线等答案!先谢谢好心人!

搜索更多相关主题的帖子: 登陆 
2006-05-08 23:27
islet
Rank: 12Rank: 12Rank: 12
等 级:贵宾
威 望:89
帖 子:6548
专家分:0
注 册:2005-1-28
得分:0 
<%
if session("IsLogin")<>"ok" then '没有登陆
response.Redirect("login.asp")
end if
%>

2006-05-09 07:49
hangxj
Rank: 6Rank: 6
等 级:贵宾
威 望:29
帖 子:2045
专家分:0
注 册:2006-4-10
得分:0 

<%
if session("IsLogin")<>"ok" then '没有登陆
end if
%>

在这你并没有做什么,比如跳出或者是提示什么的,所以它就会继续执行下面的程序!

http://www./
2006-05-09 09:03
pcia
Rank: 1
等 级:新手上路
帖 子:3
专家分:0
注 册:2006-5-9
得分:0 
在end if前面加一句response.redirect "land.asp"
land.asp是指登录框的asp文件
2006-05-09 19:25



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-62715-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 1.272826 second(s), 7 queries.
Copyright©2004-2025, BCCN.NET, All Rights Reserved