msn_add.asp

来自「综合测评.你自己看着办」· ASP 代码 · 共 31 行

ASP
31
字号
<%@LANGUAGE="JAVASCRIPT" CODEPAGE="936"%>
<!--#include file="session_2.asp" -->
<!--#include file="Connections/conn1.asp" -->
<%

if(String(Session("userno")) != "undefined"){ c1__userno1 = String(Session("userno"));} 

if(String(Session("userno"))=="undefined"){ c1__userno1 = String(Session("adminname"));} 

if(String(Request("username")) != "undefined"){ c1__username1 = String(Request("username"));}

if(String(Request("msntitle")) != "undefined"){ c1__msntitle1 = String(Request("msntitle"));}

if(String(Request("radiobutton")) != "undefined"){ c1__userface1 = String(Request("radiobutton"));}

if(String(Request("usertxt")) != "undefined"){ c1__usertxt1 = String(Request("usertxt"));}

%>
<%

var c1 = Server.CreateObject("ADODB.Command");
c1.ActiveConnection = MM_conn1_STRING;
c1.CommandText = "INSERT INTO msn (userno, username, msntitle, userface, usertxt)  VALUES ('"+ c1__userno1 + "','"+ c1__username1 + "','"+ c1__msntitle1 + "','"+ c1__userface1 + "','"+ c1__usertxt1 + "' ) ";
c1.CommandType = 1;
c1.CommandTimeout = 0;
c1.Prepared = true;
c1.Execute();
Response.Write("<script language='javascript'>alert('成功提交留言'); location=('msn.asp');</script>")
Response.End();
%>

⌨️ 快捷键说明

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