求助:ASP高手解答Cookies问题

来源:百度知道 编辑:UC知道 时间:2024/09/23 21:22:18
具体为下:
<%if request.Cookies("DVBBS_CQYY")("user_name")=empty then%>

<table width="98%" border="0" cellspacing="0" cellpadding="0">

<tr>

<td width="96%"><table width="98%" border="0" cellspacing="0" cellpadding="0" >

<form name="Login" action="bbs/login.asp?action=chk" method="post" onSubmit="return CheckForm();">
<tr>
<td width="32%" height="26" align="center" class="title t2">帐 号:</td>
<td width="68%"><input name="username" id="username" tabindex="1" type="text" style=" border:#C5C5C5 solid 1px; background:#fff; width:100px; height:21px;"

不知道你的UserID是什么类型的字段。如果是数字或者自动编号,那么要写成:
rsU.open "select * from [dv_user] where [UserID]="&request.Cookies("DVBBS_CQYY")("user_name"),conn,1,1
如果是文本格式,那么写成:
rsU.open "select * from [dv_user] where [UserID]='"&request.Cookies("DVBBS_CQYY")("user_name")&"'",conn,1,1