add_member.asp

来自「大家好」· ASP 代码 · 共 34 行

ASP
34
字号
<%@ Language=VBScript %>
<%
	function fixQuotes(theString)
			fixQuotes=Replace(theString,"'","''")
	end function
	DIM username,password
	On Error Goto 0
	username=Session("username")
	Set con=Server.CreateObject("ADODB.Connection")
	con.Open Application("DBCon_ConnectionString")
	strSql="INSERT yonghu VALUES('"+username+"','"+Request.Form("password")
	strSql=strSql+"','"+fixQuotes(TRIM(Request.Form("danwei")))
	strSql=strSql+"','"+fixQuotes(TRIM(Request.Form("guojia")))
	strSql=strSql+"','"+fixQuotes(TRIM(Request.Form("chengshi")))
	strSql=strSql+"','"+fixQuotes(TRIM(Request.Form("dizhi")))
	strSql=strSql+"','"+fixQuotes(TRIM(Request.Form("youbian")))
	strSql=strSql+"','"+fixQuotes(TRIM(Request.Form("lianxiren")))
	strSql=strSql+"','"+fixQuotes(TRIM(Request.Form("dianhua")))
	strSql=strSql+"','"+fixQuotes(TRIM(Request.Form("e_mail")))
	strSql=strSql+"','"+fixQuotes(TRIM(Request.Form("zhyue")))
	strSql=strSql+"',getdate()"
	strSql=strSql+",0)"
	insertnum=0
	Set rs=con.Execute(strSql,insertnum)
	if insertnum=1 then
		'成功
		'修改有效值
		response.redirect "../syspages/sys_regsuc.htm"
	else
		response.redirect "../syspages/error.htm"
	end if
	
%>

⌨️ 快捷键说明

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