有关cookies的小问题?(在线等候——)
我用COOKIES来判断用户是否登过,但总是说我没有登录。代码是:
<!--#include file="../wwwroot/common/z.txt"-->
<html>
<head>
<title><%=sitename%></title>
</head>
<body>
<%
user=trim(request.cookies("wwwroot")("name"))
if user<>"" then%>
<%
sql="select top 5 * from new order by id desc"
set mytext=mycon.execute(sql)
if mytext.eof or mytext.bof then
response.write"现在还没有新的内容!"
else
i=0
%>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<% do while not mytext.eof %>
<%response.write"<tr>"%>
<td width="100%"><% response.write mytext ("connect")%>
<% id=mytext("id")%><% id=mytext("id")%><a href="3.asp?id=<%=id%>">Enter
</a></td>
<% response.write"</tr>"%>
<%
i=i+1
mytext.movenext
loop
end if
mytext.close
mycon.close
%>
</table><% If i>=2 Then %>
<a href="index1.asp?type=sale"><font color="blue">
更多的信息</font></a>
<% End If %>
<%else%>
<table border="0" width="740" cellspacing="0" cellpadding="0">
<tr>
<td width="100%" height="500" valign="top" align="center"><font color="#CCFF99"><b><font size="5">对不起,你不是本站的用户,你不查看信息!</font></b><font size="5"><b>!</b></font>.</font>
<p><font size="5" color="#00FF00"><a href="../user/addnew.asp">新用户注册</a></font><font color="#CCFF99">
</font><font size="5" color="#00FF00"><a href="../index.asp">登录</a></font></p>
</td>
</tr>
</table>
<% end if %>
</body>
</html>
还想请问一下,这个("user")代表什么?我现在也没有搞懂?
这个COOKIES是不是只要放在一个有用户注册的网站的的任何页面都可以用?