savehtm.asp
来自「与asp相关的技术 如数据库和网页设计 很有用的哦」· ASP 代码 · 共 25 行
ASP
25 行
<%Option Explicit%>
<%response.buffer=true%>
<!--#INCLUDE FILE="../../../system/odbc_connection.asp"-->
<%
if session("user_type")<>"T" then
response.redirect "../../../index.asp"
end if
%>
<%
'获取有关数据,保存到数据库中
Dim title,body
title=Request.Form("title")
If title="" Then title=" " '防止插入空字符串""
body=Request.Form("body")
If body="" Then body=" " '防止插入空字符串""
'将有关数据存入数据库
Dim sql
sql = "Insert into course(lesson_id,title,body) values('" & Session("lesson_id") & "','" & title & "','" & body & "')"
db.Execute(Sql)
response.write "<script language='Jscript'> top.frames['bottom'].frames['left'].location.reload(); </script>"
'重定向回首页
response.write "<script language='Jscript'> top.frames['bottom'].frames['main'].location.replace('index.asp');</script>"
%>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?