新網頁

<% Dim Order_num,i SQL_Command="Insert into Orders Values ('" & date &"', "& Session("mid") &" ,NULL,'" & Session("address") &"','" & CStr(Fix(RND*10000)) & " ')" CmdObj.CommandText=SQL_Command CmdObj.Execute if DBError=0 then RS.Open "Select max(order_num) from Orders",DBC Order_num=RS(0) RS.Close Data=Request.Cookies("BuyData") ProdList=Split(Data,"*") for i=0 to UBound(ProdList)-1 Prod_Array=Split(ProdList(i),",") SQL_Command="Insert into Items Values(" & i+1 & "," & Order_num & "," & Prod_Array(0) & ",'" SQL_Command=SQL_Command & Prod_Array(2) & "'," & Prod_Array(3) & "," & Prod_Array(1)*Prod_Array(3) &")" CmdObj.CommandText=SQL_Command CmdObj.Execute next if DBError=0 then Response.Write "您的購買號碼為：" & Order_Num & "" Response.Cookies("BuyData")="" Response.Cookies("BuyData").Expires=Now end if end if %>