一个简单的网上书城的例子(八)
2018-09-06 12:21
buyfinish.asp:完成一次交易!记录客户信息!
<%
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")
conn.open "driver={Microsoft access(小型网站之最爱) Driver (*.mdb)};dbq=" DbPath
Set rs = conn.Execute( sql )
Set conn=nothing
%>
上一篇:FSO文件对象介绍及常用函数
下一篇:使用ASP调用C#写的COM组件