修改成功,但事实并没有成功
情况是这样的:现在下面有个表单和接受表单传值的代码段,当点击“修改”按钮时,要对游客的权限进行修改,但现在修改不了,选好权限后,点击修改,旁边会提示修改成功,但其实选中的按钮并没有改变,而且数据库里也没有改变,大家看看程序代码:
'修改游客查看联系信息设置------------------------------------------- dim gope,issee gope=Replace_Text(request.Form("gope")) issee=Replace_Text(request.Form("issee")) iswrite=Replace_Text(request.Form("iswrite")) if gope[color=#0000FF]<>"" and issee<>"" and iswrite<>"" then if issee="1" then conn.execute "update [Websen_worldec_config] set issee=1" else conn.execute "update [Websen_worldec_config] set issee=0" end if if iswrite="1" then conn.execute "update [Websen_worldec_config] set iswrite=1" else conn.execute "update [Websen_worldec_config] set iswrite=0" end if if err then msg="修改成功!" else msg="修改失败!" end if end if '-------------------------------------------------------- %> <body> <form name="peoplesee" method="post" action="grademanage.asp"> <table width="98%" border="0" cellspacing="0" cellpadding="0" align="center" class="tableBorder"> <tr> <th width="100%" height="25" class="tableHeaderText"> 会员等级信息管理</th> </tr> <tr> <td> <font color="#666666">温馨提示:①.<font color="red">等级ID</font>是会员直属某类等级的直接<font color="red">关联值</font>, 关系整个系统的所有会员的一切信息,请不要随意更改,否则将造成严重后果! <br /> ②.等级ID值不能有重复,如有,后果自负! </font> </td> </tr> <tr> <td height="1" bgcolor="#CCCCCC"> </td> </tr> <tr> <td height="20"> <% set rspe=server.CreateObject("adodb.recordset") sqlpe="select top 1 issee,iswrite from Websen_worldec_config" rspe.open sqlpe,conn,1,3 if not rspe.eof then %> <font color="red">※</font> <font color="#0099FF">游客:①是否可以查看联系信息:</font> <input type="radio" name="issee" value="1" <% if rspe("issee")=1 then response.Write("checked") end if %> />允许 <input type="radio" name="issee" value="0" <% if rspe("issee")=0 then response.Write("checked") end if %> />禁止 <font color="#0099FF">②是否可以在会员模板网站留言:</font> <input type="radio" name="iswrite" value="1" <% if rspe("iswrite")=1 then response.Write("checked") end if %> />允许 <input type="radio" name="iswrite" value="0" <% if rspe("iswrite")=0 then response.Write("checked") end if %> />禁止 <input type="submit" name="gope" value="修改" /> <font color="red"><%=msg%></font> </td> </tr> <% rspe.close end if %> </table> </form>
下面这个是函数:
程序代码:
function Replace_Text(fString) if isnull(fString) then Replace_Text="" exit function else fString=trim(fString) fString=replace(fString,">","") fString=replace(fString,"<","") fString=replace(fString,"'","") fString=replace(fString,";",";") fString=replace(fString,"--","—") fString=server.htmlencode(fString) Replace_Text=fString end if end function这个是图:
[/color]