这个数据库插入该怎么写?
为啥每次都是文章插入不了数据库,也不能重定向回原来页面?
<% Response.Buffer=True %>
<!--#Include file="conn.asp"-->
<html>
<head>
<title>回复文章</title>
</head>
<body>
<%
Dim art_id,title
art_id=Request("art_id") '返回欲回复文章编号
title=Request("title") '返回欲回复文章标题
%>
<h2 align="center">回复文章</h2>
<center>
<table border="0" width=90%>
<form method="post" action="" name="form1" >
<tr><td>主题:</td><td><input type="text" name="title" size="60"
value="re:<%=title%>"></td>
</tr>
<tr><td>内容:</td><td><textarea name="body" rows="4" cols="60" wrap="soft">
</textarea></td></tr>
<tr><td></td><td><input type="submit" value=" 提交 " size="20"></td></tr>
</form>
</table>
</center>
<p align=center><a href="particular.asp?art_id=<%=art_id%>">返回首页</a>
<%
If Request("title")<>"" And session("user_name")<>"" Then
Dim body,layer,parent_id,child,hits,user_name
title=Request.Form("title")
body=Request.Form("body")
user_name=session("user_name")
layer=2
parent_id=art_id
child=0
hits=0
Dim sql,svalues
sql="Insert Into art(title,layer,parent_id,child,hits,user_name,submit_date"
svalues = "Values('" & title & "'," & layer & "," & parent_id & "," &child & "," & hits & ",'" & user_name & "','" & now() & "'"
If body<>"" Then '如果有内容,则添加body字段
sql = sql & ",body"
svalues = svalues & "," & "'" & body & "'"
End If
sql = sql & ") " & svalues & ")"
db.Execute(sql)
db.Close
'重定向回原来页面
Response.Redirect "particular.asp?art_id=" & art_id
End If
%>
</body>
</html>