School work, have bosses to see what is the problem?
Orders3. Asp:
<% @ LANGUAGE="VBSCRIPT" CODEPAGE="936" % & gt;
<% dim name1, total, email, province, city, address, zip, phone
Name1=request (" name1 ")
Total=request (" total ")
Email=request (" email ")
Province=request (" province ")
City=request (" city ")
Address=request (" address ")
Zip=request (" zip ")
Phone=request (" phone ")
Set the conn=server. CreateObject (" adodb. Connection ")
Conn. Open MM_conn_STRING
The set rsorder=server. CreateObject (" adodb. You ")
SQL="select * from Orders"
Rsorder. The open SQL, conn, 3, 2
Rsorder. Addnew
Odate rsorder (" ")=date
Rsorder (" Total ")=Total
Rsorder (" CName ")=name1
Rsorder (" Email ")=Email
Rsorder (" Province ")=Province
Rsorder (" City ")=City
Rsorder (" Address ")=Address
Rsorder (" Zip ")=Zip
Rsorder (" Phone ")=Phone
Rsorder. Update
Rsorder. Movelast
OrderID=rsorder (" OrderID ")
Rsorder. Close
CartID=session (" CartID ")
If CartID="" then CartID=0
The set rsitem=server. CreateObject (" adodb. You ")
SQL="select * from CartsItems where CartID=" & amp; CartID
Rsitem. The open SQL, conn, 0, 1
While not rsitem. Eof
SQL="insert into OrderItems (OrderID, ProductID, PName, Price, Quantity) values (" & amp; OrderID & amp;" , "& amp; Rsitem (" ProductID ") & amp;" , '" & amp; Rsitem (" Name1 ") & amp;" ', "& amp; Rsitem (" Price ") & amp;" , "& amp; Rsitem (" Quantity ") & amp;" "
Conn. Execute SQL
Rsitem. Movenext
Wend
Rsitem. Close
Set the conn=nothing
% & gt;
<meta HTTP - equiv="content-type" Content="text/HTML. Charset=gb2312 "/& gt;
Order form & lt;/title>
<body>
Please remember your order number, so that the query when necessary, & lt; br/>
Click & lt; A href="https://bbs.csdn.net/topics/orders4.asp" & gt; Here & lt;/a> Return, & lt;/font>