insertnotice.asp

来自「我的课程设计」· ASP 代码 · 共 26 行

ASP
26
字号
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!-- #include file="conn.asp" -->
<%
	'if  (session("userright")="") then 
'		response.Redirect("../error.asp?err_on=5")
'	end if
%>
<%
    Dim  strTitle,content,strSQL
	strTitle=request.Form("title")	
	content=request.Form("content")
	if(strTitle="" or content="") then
		response.Redirect("error.asp?err_on=7")
    end if	
	strSQL = "insert into notice (title,content,createtime) values('"&strTitle&"','"&content&"','"&date()&"')"	
	db.execute(strSQL)
	
%>
<body bgcolor="#799ae1">
<table width="75%" height="89" border="1" bordercolor="#FFFFFF" >
  <tr>
    <td height="62"> 
	  <%response.Write("<font size=2 color=#FFFFFF>已经成功添加您提交的文章,两秒钟后自动返回...</font><meta http-equiv='refresh' content='2;url=addnotice.asp'>")%>
    </td>
  </tr>
</table>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?