📄 saveorder.asp
字号:
<!--#include file="conn.asp"-->
<!--#include file="config.asp"-->
<%
dim pid,pname,cname,add,lman,fax,tel,content,email,web
pid=trim(request("pid"))
pname=trim(request("pname"))
cname=checkStr(request.Form("cname"))
add=checkStr(request.Form("add"))
lman=checkStr(request.Form("lman"))
tel=checkStr(request.Form("tel"))
fax=checkStr(request.Form("fax"))
email=checkStr(request.Form("email"))
web=checkStr(request.Form("web"))
content=checkStr(request.Form("content"))
if cname="" or lman="" or tel="" then
response.Write("<script>alert('请填写完整联系内容!');history.back()</script>")
response.End()
end if
if content="" then
response.Write("<script>alert('请填写定单内容!');history.back()</script>")
response.End()
end if
dim rs
set rs=server.CreateObject("adodb.recordset")
rs.open "orders",conn,1,3
rs.addnew
rs("pid")=pid
rs("pname")=pname
rs("oname")=cname
rs("add")=add
rs("lman")=lman
rs("tel")=tel
rs("fax")=fax
rs("email")=email
rs("web")=web
rs("content")=content
rs.update
rs.close
set rs=nothing
'conn.execute("insert into orders(oname,add,lman,tel,fax,email,web,content) values('"&cname&"','"&add&"','"&lman&"','"&tel&"','"&fax&"','"&email&"','"&web&"','"&content&"')")
response.Write("<script>alert('发送成功!');location='index.asp'</script>")
closeconn
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -