数据库表
程序:为什么每次增加内容的时候,需要把标题和内容都添上数值才写入数据库,要不就写入不了
<%
if request("no")="add" then
en=trim(request.Form("en"))
title=trim(request.Form("title"))
content=trim(request.Form("content"))
set rs=server.createobject("adodb.recordset")
sql="select * from gg "
rs.open sql,conn,1,3
rs.addnew
rs("title")=title
rs("content")=content
rs("en")=en
rs.update
rs.close
set rs=nothing
response.write "<script language='javascript'>" & chr(13)
response.write "alert('修改成功!');" & Chr(13)
response.write "window.document.location.href='ggs.asp';"&Chr(13)
response.write "</script>" & Chr(13)
Response.End
end if%>
<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td align="center" valign="top">
<table width="90%" border="0" cellpadding="2" cellspacing="1" class="table_southidc">
<form name="myform" method="post" action="?no=add" >
<tr align="center">
<td class="back_southidc" height="30" colspan="2">公告增加</td>
</tr>
<tr bgcolor="#ECF5FF">
<td height="24" align="right">中英文选择</td>
<td valign="top"><label>
<select name="en">
<option value="1">中文</option>
<option value="2">英文</option>
</select>
</label></td>
</tr>
<tr bgcolor="#ECF5FF">
<td height="24" align="right">标题:</td>
<td valign="top"><input type="text" name="title"></td>
</tr>
<tr bgcolor="#ECF5FF">
<td width="22%" height="24" align="right">内容</td>
<td width="78%" valign="top">
<textarea name="content" style="display:none"></textarea>
<iframe id="eWebEditor1" src="editor/ewebeditor.asp?id=content&style=s_3d" frameborder="0" scrolling="no" width="98%" height="350"></iframe></td>
</tr>
<tr align="center" bgcolor="#ECF5FF">
<td height="35" colspan="2">
<input type="submit" name="Submit" value="提交" class="input">
<input type="reset" name="Submit2" value="重置" class="input"> </td>
</tr>
</form>
</table>
</td>
</tr>
</table>
[此贴子已经被作者于2007-3-25 18:55:46编辑过]