有关request.querystring和get以及request.form与post的配对使用
<!--include file="../comm/myconn.asp"-->
<%
if lcase(session("login"))<>"ok" and lcase(session("login"))<>"admin" then
Response.Redirect "/hngz9768/comm/error.asp?name=l"
Response.end
end if
dim gtext
dim gtop
'Response.Write Request.querystring("usertext")
'Response.Write Request.querystring("usertop") & "<br>"
gtext=Request.querystring("usertext")
'Response.Write gtext
gtop=Request.querystring("usertop")
'Response.Write gtop
gtext =Replace(gtext, chr(34), """)
gtext =Replace(gtext, chr(60), "<")
gtext =Replace(gtext, chr(62), ">")
gtext =Replace(gtext, chr(13), "<br>")
gtext =Replace(gtext, chr(32), " ")
gtop =Replace(gtop, chr(34), """)
gtop =Replace(gtop, chr(60), "<")
gtop =Replace(gtop, chr(62), ">")
gtop =Replace(gtop, chr(13), "<br>")
gtop =Replace(gtop, chr(32), " ")
if gtext="" or gtop="" then
set gtext=nothing
set gtop=nothing
Response.Redirect "/hngz9768/comm/error.asp?name=b"
Response.end
elseif len(gtop)>20 or len(gtext)>1000 then
set gtext=nothing
set gtop=nothing
Response.Redirect "/hngz9768/comm/error.asp?name=b"
Response.end
else
dim myrs
dim nowtime
nowtime=now
set myrs=server.createobject("ADODB.Recordset")
myrs.open "insert into [guestbook]([loginame],[logo],[txgtop],[gtext],[time]) values ('" & session("name") & "',' ','" & gtop & "','" & gtext & "','" & nowtime & "')",myconn,1,1
set myrs=nothing
set myconn=nothing
set nowtime=nothing
set gtext=nothing
set gtop=nothing
response.write gtext
response.write gtop
Response.Redirect "/hngz9768/comm/error.asp?name=a"
Response.end
end if
%>
当
gtext=Request.querystring("usertext")
gtop=Request.querystring("usertop")
这两个赋值语句同时使用的话
就会出现http 500 内部服务器错误
但是只是用 一个的话
就显示哪一个正常
而且
我用post提交,然后用request.form接受的话
也是同样的问题
求助