一聚教程网:一个值得你收藏的教程网站

最新下载

热门教程

一个简单网上书城的例子(九)!

时间:2022-07-02 23:34:35 编辑:袖梨 来源:一聚教程网

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")=""
%>


<%=sql%>

顾客购物信息:



姓名:<%=Name%>

电话:<%=Tel%>

住址:<%=Address%>

<% Products = Split(ProductID, "/")
     ProductNames = Split(ProductName, "/")
     Quatities = Split(Quatity,"/") %>
     书刊编号__书刊名称 (数量)

     <% For I=0 To UBound(Products) %>
     <%=Products(i)%>__<%=ProductNames(i)%> (<%=Quatities(i)%>)

<%next%>
书刊总价:<%=Sum%>


上述购物清单已提交服务台办理。多谢惠顾!


返回

<%
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
%>

热门栏目