社区
ASP
帖子详情
关于session问题?很简单!
jshao
2003-05-23 04:01:34
如何判断一个用户应经登录,没超时则显示用户名,否则显示登录框?
...全文
28
8
打赏
收藏
关于session问题?很简单!
如何判断一个用户应经登录,没超时则显示用户名,否则显示登录框?
复制链接
扫一扫
分享
转发到动态
举报
写回复
配置赞助广告
用AI写文章
8 条
回复
切换为时间正序
请发表友善的回复…
发表回复
打赏红包
jshao
2003-05-24
打赏
举报
回复
谢谢!!
esaler
2003-05-23
打赏
举报
回复
是的
sina1680
2003-05-23
打赏
举报
回复
agree
wdfboy1978
2003-05-23
打赏
举报
回复
agree!
fangpeng2003
2003-05-23
打赏
举报
回复
还是一样的原理啊,用session判断
<%if session("login")="false" then%>
<table width="100%" border="0" cellspacing="1" cellpadding="0" bgcolor="#B6D9EB" align="center" height="180">
<tr align=center bgcolor="#B6D9EB">
<td height="22" bgcolor="#B6D9EB">
<table align=center width="100" border="0" cellspacing="1" cellpadding="0" bgcolor="#B6D9EB">
<tr bgcolor="#FFFFFF">
<td>
<div align="center" class=green>登录论坛 </div>
</td>
</tr>
</table>
</td>
</tr>
<tr bgcolor="#FFFFFF" align=center>
<td>
<table width="100%" border="0" cellspacing="0" cellpadding="10" align="center" >
<tr>
<td align=center>
<form method="post" action="logon.asp" target=_top>
<div align="center">帐号:
<input type="text" name="uid" size="10" maxlength="20" class=text>
<br>
<br>
密码:
<input type="password" name="pwd" size="10" maxlength="20" class=text>
<br>
<br>
<input type="submit" name="Submit3" value=" 进入 " class=submit>
<input type="button" value=" 注册 " class="submit" onClick="javascript:window.document.location.href='register.asp';" name="button">
</div>
</form>
[注册仅需20秒] </td>
</tr>
</table>
</td>
</tr>
</table>
<%else%>
<table width="100%" border="0" cellspacing="1" cellpadding="0" bgcolor="#B6D9EB" align="center" height="180">
<tr align=center bgcolor="#B6D9EB">
<td height="22" bgcolor="#B6D9EB">
<table align=center width="100" border="0" cellspacing="1" cellpadding="0" bgcolor="#FFFFFF">
<tr bgcolor="#FFFFFF">
<td>
<div align="center" class=green>个人信息 </div>
</td>
</tr>
</table>
</td>
</tr>
<tr bgcolor="#FFFFFF" align=center>
<td>
<table border="0" cellspacing="0" cellpadding="8" align="center" width="100%">
<tr>
<td><font color=red><%
sql="select * from user where uid='"&uid&"'"
set rs=conn.execute(sql)
%><%=rs("uid")%></font>,你还好吗?<br>
这是你第<font color=red><%=rs("lt")%></font>次来到这里,
你已经发帖:<font color=red><%=rs("plan")%></font>个,阅帖:<font color=red><%=rs("readed")%></font>个,
你现在经验值为<font color=red><%=rs("exp")%></font>,身份为<font color=red><%=userclass(rs("id"))%> </font>。
<%
Set rs = Server.CreateObject("ADODB.Recordset")
sql="select id from message where receive='"&uid&"'"
rs.open sql,conn,1,1
%>
<br>你有<font color=red><%=rs.recordcount%></font>个留言, <%
rs.close
Set rs = Server.CreateObject("ADODB.Recordset")
sql="select id from message where new=1 and receive='"&uid&"'"
rs.open sql,conn,1,1
%> 其中<font color=red><%=rs.recordcount%></font>个新留言 。<a href="readmessage.asp" title="查阅短消息">>></a><%rs.close%>
</td>
</tr>
</table>
</td>
</tr>
</table>
<%end if%>
jshao
2003-05-23
打赏
举报
回复
我想实现的就像csdn论坛上边的那个,没登陆时显示的是
用户名_____密码_____[登陆] [注册]
登陆后显示的是
你是____信誉分____[注销我的登陆]
zhangguagua
2003-05-23
打赏
举报
回复
同意楼上
sailor001
2003-05-23
打赏
举报
回复
if session("login")="ok" then
response.redirect("index.asp")
else
response.redirect("login.asp")
end if
什么是
session
?什么是cookie?
session
和cookie有什么区别?
【背景介绍】【知识剖析】【常见
问题
】【解决方案】【编码实战】【扩展思考】【更多讨论】【参考文献】 八个方面深度解析前端知识/技能,本篇分享的是: 【什么是
session
?什么是cookie?
session
和cookie有什么...
Session
、Cookie、
Session
id???一篇通通搞清楚!!!
倘若一个
简单
的图书查询网站,自己定义了一个数据库当作存储位置,创建一个方法当有新的用户登录,会返回一个id,并在一个表内创建一个id,这就是
Session
id,还有用户查询的图书的记录,(假如这个网站有一个查询...
跨域、跨服务器调用时候
session
丢失的
问题
总结!!!
项目分了很多个子系统,在部署(测试)的时候是每个Tomcat上面只放一个子系统。比如现在有5个子系统,那么就会对应5个Tomcat启动了放在linux上面的。为什么这么做?试想如果在上线以后,如果其中一个系统有
问题
要...
如何在jq文件里面直接获取java的
session
值?
我们做在项目的时候,可能会...其实,在jq文件里面获取
session
真的非常
简单
!一行代码就搞定。代码如下: var result = $.
session
.get('result');//其中result就是你之前在其他地方保存下来的
session
的名称 ...
Cookie和
Session
的区别、工作流程是什么?全网最详细!
想要了解Cookie和
Session
的工作流程,首先需要来了解一下什么是Cookie,什么是
Session
?之后我将会用一个用户登录(附加:前端+后端 代码)的栗子,让你通透整个工作流程;
session
Id是由服务器生成的一个“唯一性...
ASP
28,408
社区成员
356,956
社区内容
发帖
与我相关
我的任务
ASP
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
复制链接
扫一扫
分享
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
加入社区
获取链接或二维码
近7日
近30日
至今
加载中
查看更多榜单
社区公告
暂无公告
试试用AI创作助手写篇文章吧
+ 用AI写文章