哪位高手给我指点一下````````````!
<%
id=request("id")
dim logname,pasword
function sqlstr(data)
sqlstr="'" & Replace(data,"'","''") & "'"
end function
logname=request("adname")
pasword=request("paword")
response.Write(logname)
response.Write(pasword)
if logname="" then
response.Write"<center><h1>错误操作!将返回</h1></center>"
response.Redirect("maiindex.asp")
response.End
else
if logname="" or pasword="" then
response.write"<p align=center>出错提示:ID不存在或者密码不对!</p>"
response.Redirect("login.asp?id="&id)
response.End
else
set cn =server.CreateObject("ADODB.Recordset")
sql="SELECT * FROM maiche where khid='"&sqlstr(logname)&"' and khpws='"&sqlstr(pasword)&"' and id="&id
cn.open sql,conn,1,3
if cn.eof then
response.write"<p align=center>出错提示:ID不存在或者密码不对!</p>"
response.Redirect("login.asp?id="&id)
response.End
else
response.write"<p align=center>登录成功!</p>"
session("id")=cn("id")
response.Redirect("maicheshow.asp?idd="&id)
end if
end if
end if
%>
红色地方都有错误的出现的地方!
错误一般如下:
/222/2手车详情/maiche/loginpass.asp, line 22
response.write"<p align=center>出错提示:ID不存在或者密码不对!</p>"
难道我不能用response.write,真的太奇怪了!