一个简单的网上书城的例子(八)
程序员文章站
2022-07-02 19:00:49
buyfinish.:完成一次交易!记录客户信息!<%name=request("customer_n")tel=request("customer_t"...
buyfinish.:完成一次交易!记录客户信息!
<%
name=request("customer_n")
tel=request("customer_t")
address=request("customer_a")
productid=request("customer_p")
productname=request("customer_pn")
quatity=request("customer_q")
sum=request("customer_s")
session("productlist")=""
%>
<head><meta http-equiv="refresh" content="30; url=main.asp"></head>
<body background=b01.jpg>
<%=sql%><br>
<center><h2><font color=blue>顾客购物信息:</h2></font>
<table width=50% border=1><tr><td>
姓名:<%=name%><br>
电话:<%=tel%><br>
住址:<%=address%><br>
<% products = split(productid, "/")
productnames = split(productname, "/")
quatities = split(quatity,"/") %>
书刊编号__书刊名称 (数量)<br>
<% for i=0 to ubound(products) %>
<%=products(i)%>__<%=productnames(i)%> (<%=quatities(i)%>)<br>
<%next%>
书刊总价:<%=sum%><br>
</td></tr></table>
上述购物清单已提交服务台办理。多谢惠顾!
<hr width=80%>
<a href=main.asp>返回</a>
</body>
<%
sql = "insert into buyinfomation (name,tel,address,productid,quatity,sum) "
sql = sql & " values ( "+name+","+tel+","+address+","+productid+","+quatity+","+sum+")"
dbpath = server.mappath("shopbag.mdb")
set conn = server.createobject("adodb.connection")
conn.open "driver={microsoft access(小型网站之最爱) driver (*.mdb)};dbq=" & dbpath
set rs = conn.execute( sql )
set conn=nothing
%>
<%
name=request("customer_n")
tel=request("customer_t")
address=request("customer_a")
productid=request("customer_p")
productname=request("customer_pn")
quatity=request("customer_q")
sum=request("customer_s")
session("productlist")=""
%>
<head><meta http-equiv="refresh" content="30; url=main.asp"></head>
<body background=b01.jpg>
<%=sql%><br>
<center><h2><font color=blue>顾客购物信息:</h2></font>
<table width=50% border=1><tr><td>
姓名:<%=name%><br>
电话:<%=tel%><br>
住址:<%=address%><br>
<% products = split(productid, "/")
productnames = split(productname, "/")
quatities = split(quatity,"/") %>
书刊编号__书刊名称 (数量)<br>
<% for i=0 to ubound(products) %>
<%=products(i)%>__<%=productnames(i)%> (<%=quatities(i)%>)<br>
<%next%>
书刊总价:<%=sum%><br>
</td></tr></table>
上述购物清单已提交服务台办理。多谢惠顾!
<hr width=80%>
<a href=main.asp>返回</a>
</body>
<%
sql = "insert into buyinfomation (name,tel,address,productid,quatity,sum) "
sql = sql & " values ( "+name+","+tel+","+address+","+productid+","+quatity+","+sum+")"
dbpath = server.mappath("shopbag.mdb")
set conn = server.createobject("adodb.connection")
conn.open "driver={microsoft access(小型网站之最爱) driver (*.mdb)};dbq=" & dbpath
set rs = conn.execute( sql )
set conn=nothing
%>
上一篇: 汉文帝为何要实行的“无为而治”?与历史历史环境脱不了关系
下一篇: SQLite_数据存储代码实例