高端瓷砖品牌有哪些:请教一个关于数据提交添加的问题,为何我的程序不能提交呢

来源:百度文库 编辑:杭州交通信息网 时间:2024/04/28 05:51:18
<!--#include file="conn.asp"-->

<%

dim ID,titlek,bodyk,
dim httpk,downurl
dim size
dim mydate,t55
dim founderr
founerr=false
if trim(request.form("t1"))="" then
founderr=true
errmsg=errmsg+"<li>名称不能为空</li>"
end if
if trim(request.form("t2"))="" then
founderr=true
errmsg=errmsg+"<li>简介不能为空</li>"
end if
if trim(request.form("t3"))="" then
founderr=true
errmsg=errmsg+"<li>页面网址不能为空</li>"
end if
if trim(request.form("t5"))="" then
founderr=false
t55="未知"
else

t55=trim(request.form("t5"))
founderr=false
end if
%>
<html>

<head>
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>添加成功</title>
</head>

<body>

<%if founderr=false then
titlek=request("t1")
bodyk=request("t2")

httpk=request("t3")
httpk=replace(httpk,"http://","")
downurl=request("t4")
size=t55

set rs=server.createobject("adodb.recordset")
if request("action")="add" then
call fihunew()
elseif request("action")="edit" then
call fihuedit()
end if
sub fihunew()
sql="select * from mytable where httpk='"&httpk&"'"

rs.open sql,conn,1,3
if rs.eof then
rs.addnew
rs("titlek")=titlek
rs("bodyk")=bodyk
rs("httpk")=httpk
rs("downurl")=downurl
rs("size")=size
rs("mydate")=Now()
rs.update
else
errmsg=errmsg+"<li>数据已存在,不要重复添加</li>"
end if
end sub
sub fihuedit()
sql="select * from mytable where ID="&request("ID")
......
...............
rs.update
end sub
set rs=nothing
conn.close
set conn=nothing

end if
%>

是用的模板吗,没看到request()函数的定义