程序出问题了,请高手来看看,问题出在哪里!!
第一个页面<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="../config/conn.asp"-->
<%
on error resume next
dim rst,sql,rst1,sql1,rst2,sql2
set rst=server.CreateObject("adodb.recordset")
set rst1=server.CreateObject("adodb.recordset")
set rst2=server.CreateObject("adodb.recordset")
if request.QueryString("act")="modify" then
sql="select * from bianquzuopin where b_id="&request.querystring("id")
rst.open sql,conn,1,3
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>修改新闻</title>
<link href="Images/css1/css.css" rel="stylesheet" type="text/css">
</head>
<body>
<p> </p>
<table width="624" border="1" align="center" cellpadding="0" cellspacing="0">
<form action="admin_bqzp_act.asp?act=update&id=<%=rst("b_id")%>" method="post" enctype="multipart/form-data" name="form3" id="form3">
<tr>
<td height="41" colspan="2" class="bg_tr" align="center">修改</td>
</tr>
<tr>
<td height="37" colspan="2" align="left" class="bg_tr">选择分类:
<select name="f_upid1" id="f_upid1">
<%
sql2="select * from bianquzuopinclass where bc_id=" & rst("b_upid")
rst2.open sql2,conn,1,1
%>
<option value="0" selected><%=rst2("bc_name")%></option>
<%
sql1="select * from bianquzuopinclass "
rst1.open sql1,conn,1,1
do while not rst1.eof
%>
<option value="<%=rst1("bc_id")%>"><%=rst1("bc_name")%></option>
<%
rst1.movenext
loop
rst1.close
rst2.close
%>
</select>
</td>
</tr>
<tr>
<td width="68" height="37" align="right" class="bg_tr">标题:</td>
<td width="550" class="bg_tr"><input name="f_name1" type="text" id="f_name1" value="<%=rst("b_name")%>" size="51" maxlength="30"> </td>
</tr>
<tr>
<td align="right" valign="top" class="bg_tr">内容:</td>
<td ><input type="hidden" name="f_content1" value="<%=Server.HTMLEncode(rst("b_content"))%>" id="f_content1">
<iframe id="eWebEditor1" src="../Editor/ewebeditor.html?id=f_content1&style=coolblue" frameborder="0" scrolling="no" width="550" height="350"></iframe></td>
</tr>
<tr>
<td width="68" height="37" align="right" class="bg_tr">首页文件:</td>
<td width="550" valign="middle" class="bg_tr"><input type="file" name="f_mv1" /> </td>
</tr>
<tr>
<td height="37" colspan="2" align="center" valign="bottom" class="bg_tr"><input type="submit" name="Submit" value="提交">
<input type="reset" name="Submit2" value="重置"></td>
</tr>
</form>
</table>
<p> </p>
</body>
<%
end if
set rst1=nothing
set rst2=nothing
set rst=nothing
conn.close
set conn=nothing
%>
</html>
提交处理的页面
<%
if request.QueryString("act")="update" then
if trim(formdata.item("f_name1"))="" or trim(formdata.item("f_content1"))="" then
response.write "<script language=JavaScript>" & chr(13) & "alert('标题或内容不能为空');" & "history.back()" & "</script>"
response.End
else
sql="select * from banzouxiazai where b_id=" & request.QueryString("id")
rst.open sql,conn,1,3
if formdata.item("f_mv1")="" then
rst("b_name")=formdata.item("f_name1")
rst("b_content")=formdata.item("f_content1")
rst("b_upid")=formdata.item("f_upid1")
else
if rst("b_mv") <> "" then
fs.deletefile server.MapPath("../upfile") & "\" & rst("b_mv")
end if
rst("b_mv")=formdata.item("f_mv1")
rst("b_upid")=formdata.item("f_upid1")
rst("b_name")=formdata.item("f_name1")
rst("b_content")=formdata.item("f_content1")
end if
rst.update
rst.close
set myerrors=conn.errors
if myerrors.count=0 then
response.write "<script language=JavaScript>" & chr(13) & "alert('修改成功!');"&"window.location.href = 'admin_bzxz.asp'"&" </script>"
else
response.write "<script language=JavaScript>" & chr(13) & "alert('修改失败!原因:');" & "history.back()" & "</script>" & myerrors.item(0).description
end if
end if
end if
%>
提交的时候别的都可以被修改,除了下拉列表的不能被修改,请大家看看是怎么回事?