<!--#include file="conn.asp"--> <!--#include file="session.asp"--> <% action=request.form("action") %> <% dim fname dim fshou dim flei dim furl dim pic dim lei if request.Form("Fname")="" then response.write "<Script Language=JavaScript>alert('出错了!请输入动画名');history.back();</Script>" response.end end if if request.form("Fshou")="" then response.write "<script language=javascript>alert('出错了,请输入制作人');history.back();</script>" response.end end if if request.form("Flei")="" then response.write "<script language=javascript>alert('出错了,请选择类');history.back();</script>" response.end end if if request.form("Furl")="" then response.write "<script language=javascript>alert('url地址没有写');history.back();</script>" response.end end if if request.form("pic")="" then response.write "<script language=javscript>alert('图片地址不能为空');hsitory.back();</script>" response.end end if
id=request.form("id") fname=trim(request.Form("Fname")) fshou=trim(request.form("Fshou")) flei=trim(request.form("Flei")) furl=trim(request.form("Furl")) pic=trim(request.form("pic")) lei=trim(request.form("lei"))
set rs=server.CreateObject("adodb.recordset") sql="select * from flash where id="& id rs.open sql,conn,1,3 rs.addnew rs("fname")="name" rs("fshuo")="shou" rs("flei")="lei" rs("furl")="url" rs("pic")="pic" rs("jei")="lei" rs.update rs.close set rs=nothing %> <%if fname="" then response.write "<Script Language=JavaScript>alert('出错了!请输入动画名');history.back();</Script>" response.end end if if fshou="" then response.write "<script language=javascript>alert('出错了,请输入制作人');history.back();</script>" response.end end if if flei="" then response.write "<script language=javascript>alert('出错了,请选择类');history.back();</script>" response.end end if if furl="" then response.write "<script language=javascript>alert('url地址没有写');history.back();</script>" response.end end if fname=trim(request.Form("Fname")) fshou=trim(request.form("Fshou")) flei=trim(request.form("Flei")) furl=trim(request.form("Furl")) pic=trim(request.form("pic")) lei=trim(request.form("lei"))
set rs=server.CreateObject("adodb.recordset") sql="select * from flash" rs.open sql,conn,1,3 rs.addnew rs("fname")="name" rs("fshuo")="shou" rs("flei")="lei" rs("furl")="url" rs("pic")="pic" rs("jei")="lei" rs.update rs.close set rs=nothing conn.close set conn=nothing response.write "<script language=javascript>alert('添加成功^-^反回继续添加');location.href='index.htm';</script>" response.end %> 这是一个添加到数据库的程序~`总是不对~`各位大吓们能帮帮忙吗?