WEB开发网
开发学院WEB开发ASP 一个简单的网上书城的例子(八) 阅读

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

 2001-08-09 10:59:55 来源:WEB开发网   
核心提示:buyfinish.asp:完成一次交易!记录客户信息!<%Name=Request("Customer_N")Tel=Request("Customer_T")Address=Request("Customer_A")PRoductID=Request
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")
Set conn = Server.CreateObject("ADODB.Connection")
conn.open "driver={Microsoft access Driver (*.mdb)};dbq=" & DbPath
Set rs = conn.Execute( sql )
Set conn=nothing
%>


Tags:一个 简单 网上书城

编辑录入:爽爽 [复制链接] [打 印]
赞助商链接