<%
userid=request("userid")
set rs=server.CreateObject("adodb.recordset")
sql="select * from NC_User where userid="&userid
rs.open sql,conn,1,3
if request.Form("submit")="修改" then
rs("nickname")=trim(request.Form("nickname"))
rs("UserIDCard")=trim(request.Form("UserIDCard"))
rs("userlastip")=trim(request.Form("userlastip"))
rs("UserLock")=trim(request.Form("UserLock"))
rs("ExpireTime")=trim(request.Form("ExpireTime"))
rs.update
rs.close
set rs=nothing
response.Write("<script>alert('操作成功');location.href='look.asp';</script>")
end if
%>
现要求按数据表UserGroup='VIP会员'的才能修改,就是只能修改是VIP会员的数据,其它的数据不列出来,
现在的是只要输入编号都能修改
你的意思是不是只要修改vip的,其他数据不变。具体代码如下 自己看看是不是这种效果
<%
userid=request("userid")
set rs=server.CreateObject("adodb.recordset")
sql="select * from NC_User where userid="&userid&" and UserGroup='vip'"
rs.open sql,conn,1,3
if request.Form("submit")="修改" then
rs("nickname")=trim(request.Form("nickname"))
rs("UserIDCard")=trim(request.Form("UserIDCard"))
rs("userlastip")=trim(request.Form("userlastip"))
rs("UserLock")=trim(request.Form("UserLock"))
rs("ExpireTime")=trim(request.Form("ExpireTime"))
rs.update
rs.close
set rs=nothing
response.Write("<script>alert('操作成功');location.href='look.asp';</script>")
end if
%>
if request.Form("submit")="修改" then
改为
if request.Form("submit")="修改" and rs("userGroup")="VIP会员" then
如以上回答内容为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
点此我要举报以上问答信息