求救吖~谁来帮我看下这段ASP留言板代码哪错了?谢谢了

来源:百度知道 编辑:UC知道 时间:2024/06/29 23:11:28
<!--#include file="conn.asp"-->
<%
title=request.form("title")
content=request.form("content")
subtime=now()
conn.execute("insert into board (title,content,subtime) values('"&title&"','"&content&"','"&subtime&"')")
%>
<script>
alert("留言成功!");
location.href="board.asp";
</script>
哪请位能帮我看下这段代码哪里错了。。。
我跳转的时候显示说conn.execute("insert into board (title,content,subtime) values('"&title&"','"&content&"','"&subtime&"')")
这里有问题。。。可是我看不懂。。。请求帮助。。。。谢谢了。。。。。

title,content,subtime字段的数据类型都是字符串??
要不就是,你提交的数据里面含有 单引号
title= replace(request.form("title"),"'","''")
content = replace(request.form("content"),"'","''")
试试