一个非常奇怪的问题!!关于asp的比较运算符!!
<html>
<head>
<title>删除人员</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<body>
<% if isempty(session("序号")) then
response.Write("您没有登陆!请返回<a href=""login.asp"">登陆页</a>登陆!")
response.End
end if
%>
<!--#include file="newconn.asp"-->
<p>
<%
response.Write(session("序号"))
response.Write(request.QueryString("id"))
if request.QueryString("power")="管理员" then
response.Write("不可以删除管理员!")
response.End
end if
if request.QueryString("id")<>session("序号") then
response.Write("您不可以删除别人的信息!只可以删除自己的!")
response.End
end if
con.execute "delete * from table1 where 序号="&request.QueryString("id")&""
response.Write("删除成功!")
con.close
set con=nothing
%>
</p>
<p><a href="data.asp">返回首页</a></p>
</body>
</html>
我通过程序调试输出发现 request.QueryString("id") session("序号") 是两个相等的数值,但是程序运行if request.QueryString("id")<>session("序号") then
这个判断语句总是为真,所以就是会执行response.Write("您不可以删除别人的信息!只可以删除自己的!")
response.End这2句话,我非常郁闷阿,难道是我的asp的if,else语句嵌套出现问题了阿,在线等,情大家帮忙阿!!