addok.asp

来自「功能的增加及完善 1.完善了上次不能读写房源编号的错误; 2.增加了不是会员」· ASP 代码 · 共 42 行

ASP
42
字号
<!--#include file="pass.asp"-->
<!--#include file="conn.asp"-->
<%   
function encodestr(str)
	dim i
	str=trim(str)
	str=replace(str,"<","&lt;")
	str=replace(str,">","&gt;")
	str=replace(str,"'","""")
	str=replace(str,vbCrLf&vbCrlf,"</p><p>")
	str=replace(str,vbCrLf,"<br>")
	encodestr=replace(str,"  "," ")
end function
 
	title=encodestr(request.form("title"))
	news_content=replace(trim(request.form("news_content")),"'","''")
	'guestcontent=encodestr(request.form("guestcontent"))
	classname=Request.Form("classname")
	sql="insert into imgbook (title,news_content,classname) values ('"& title &"','"&news_content&"','"& classname &"')"
	conn.execute(sql)
    conn.close
    set conn=nothing      %>
<html>
<head>
<title>图片加入数据库成功!</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta http-equiv="refresh" content="1;URL=add.asp">
</head>

<body bgcolor="#FFFFFF" text="#000000">
<div align="center"><br>
  <br>
  <br>
  <br>
  <br>
  <br>
  <font size="2">您的图片已经成功的加入到数据库了。<a href="javascript:history.back()">请返回继续管理</a>! 
  </font></div>
</body>
</html>

⌨️ 快捷键说明

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