新微赢技术网
标题:
[求助]提交老出错
[打印本页]
作者:
绝不放弃
时间:
2010-1-17 08:29
标题:
[求助]提交老出错
帮我看看,提交老出错
<!--#include file="inc/conn.asp"-->
<%
dim id
id=request.querystring("id")
title=request.form("title")
content=request.form("content")
writer=request.form("writer")
sql="select * from News where Id ="&id
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,3
if request("act")="ok" then
rs("id")=id
rs("title")=title
rs("content")=content
rs("writer")=writer
rs("infotime")=date()
rs.update
rs.close
set rs=nothing
response.write "<script>alert('提交成功');history.back();</script>"
else
%>
<!--#include file="inc/head.asp"-->
<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td valign="top"><table border=0 cellpadding=0 cellspacing=0 width=760 align=center>
<form method=post name=form action="admin_asp.asp">
<tr >
<td background="images/titlebg.gif" height="20" colspan=2><div align="center">编辑信息</div></td>
</tr>
<tr bgcolor="#DDE4F2">
<td width="149">标题:</td><td width="611"><input type=text name=title value=<%=rs("title")%>></td>
</tr>
<tr bgcolor="#DDE4F2">
<td>作者;</td><td><input type=text name=writer value=<%=rs("writer")%>></td>
</tr>
<tr bgcolor="#DDE4F2">
<td>内容:</td>
<td><textarea name=content cols=60 rows=6 value=<%=rs("content")%>></textarea></td>
</tr>
<tr bgcolor="#DDE4F2">
<td colspan=2 align="center"><input type=submit name=submit value=提交> <input type=reset name=reset value=重置><input type=hidden name=act value=ok></td>
</tr></form></table></td>
</tr>
</table>
<%end if%>
</body>
</html>
欢迎光临 新微赢技术网 (http://bbs.weiying.cn/)
Powered by Discuz! X3.2