Home > Software engineering >  School work, have bosses to see what is the problem?
School work, have bosses to see what is the problem?

Time:11-12


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> <br/></head> <br/><br/><body> <br/><Font color="# 000000" size="4" face="Chinese song typeface" & gt; Thank you to patronize! Your order number is: & lt; % %=OrderID & gt; <br/> <br/>Please remember your order number, so that the query when necessary, & lt; br/> <br/>Click & lt; A href="https://bbs.csdn.net/topics/orders4.asp" & gt; Here & lt;/a> Return, & lt;/font> <br/></body> <br/></html> <br/><br/><br/>Why didn't the Orders data table data? There is only one date, <br/><img SRC="https://img.codepudding.com/202011/162582121154481.png" Alt=""/> <br/><br/>Page code is as follows: <br/>Orders2. Asp: <br/><% @ LANGUAGE="VBSCRIPT" CODEPAGE="936" % & gt; <br/><! - # include file="Connections/conn. Asp" - & gt; <br/><% <br/>Dim rs__MMColParam <br/>Rs__MMColParam="1" <br/>If (Session (" CartID) & lt;> "") Then <br/>Rs__MMColParam=Session (" CartID ") <br/>End the If <br/>% & gt; <br/><% <br/>Dim the rs <br/>Dim rs_cmd <br/>Dim rs_numRows <br/><br/>Set rs_cmd=Server. CreateObject (" mand "ADODB.Com <br/>Rs_cmd. ActiveConnection=MM_conn_STRING <br/>Rs_cmd.Com mandText="SELECT * FROM CartsItems WHERE CartID=?" <br/>Rs_cmd. Prepared=true <br/>Rs_cmd. The Parameters. Append rs_cmd. CreateParameter (" param1, 5, 1, 1, rs__MMColParam) 'adDouble <br/><br/>Set the rs=rs_cmd. Execute <br/>Rs_numRows=0 <br/>% & gt; <br/><% <br/>Dim Repeat1__numRows <br/>Dim Repeat1__index <br/><br/>Repeat1__numRows=1 <br/>Repeat1__index=0 <br/>Rs_numRows=rs_numRows + Repeat1__numRows <br/>% & gt; <br/><! PUBLIC DOCTYPE HTML "-////W3C DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" & gt; <br/><HTML XMLNS="http://www.w3.org/1999/xhtml" & gt; <br/><head> <br/><meta HTTP - equiv="content-type" Content="text/HTML. Charset=gb2312 "/& gt; <br/><title> Confirmation of order & lt;/title> <br/><style type="text/css"> <br/>P {<br/>font-weight: bold; <br/>text-align: center; <br/>} <br/>Td {<br/>font-size: 18px; <br/>The line - height: 24 px; <br/>Color: # 15007 b; <br/>font-weight: bold; <br/>} <br/></style> </head> <br/><br/><body> <br/><The form id="form1" name="form1" method="post" action="orders3. Asp & gt;" <br/><P> <Font color="# 800080" size="5" face="Chinese song typeface" & gt; Your order as below & lt;/font> </p> <br/><Table width="75%" border="1" align="center" & gt; <br/><Tr> <br/><Td width="40" align="center" bgcolor="# CCCCCC" & gt; The serial number & lt;/td> <br/><Td align="center" bgcolor="# CCCCCC" & gt; Name of commodity & lt;/td> <br/><Td align="center" bgcolor="# CCCCCC" & gt; The unit price & lt;/td> <br/><Td align="center" bgcolor="# CCCCCC" & gt; Quantity & lt;/td> <br/><Td align="center" bgcolor="# CCCCCC" & gt; The amount & lt;/td> <br/></tr> <br/><br/> % I=1Total=0 <br/>While ((Repeat1__numRows & lt;> 0) AND (NOT rs. EOF)) <br/>Sum=rs (" Price ") * rs (" Quantity ") <br/>% & gt; <Tr> <br/><Td align="center" & gt; <% %=formatnumber (I, 0) & gt; & nbsp; </td> <br/><Td align="center" & gt; <%=(rs) Fields) Item (" Name1 "). The Value) % & gt; </td> <br/><Td align="center" & gt; <%=formatcurrency (rs) Fields) Item (" Price "). The Value, 2) % & gt; </td> <br/><Td align="center" & gt; <%=(rs) Fields) Item (" Quantity "). The Value) % & gt; </td> <br/><Td align="center" & gt; <%=formatcurrency (sum, 2) % & gt; & nbsp; </td> <br/><nullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnull </div> <div class="th_page th_page_color"></div> <div class="umCopyright"> <p>Page link:<a href="/Softwareengineering/80793.html" target="_blank" style="color:#999">https//www.codepudding.com/Softwareengineering/80793.html</a></p> </div> <div class="detail-arr"> <div class="detail-arr-left">Prev:<a href='/Softwareengineering/80792.html'>Requirements:</a></div> <div class="detail-arr-right">Next:<a href='/Softwareengineering/80794.html'>Based on keyword search and automatically assigned to the corresponding worksheet</a></div> </div> </div> </div> </div> </div> <div class="container th_top"> <div class="row"> <div class="col-md-12"> <div class="hot-tags neitags"> <ul> <li><i class="iconfont icon-x-tags"></i> Tags:  </li> <a href='/e/tags/?tagname=Network+programming' target='_blank'>Network programming</a> </ul> </div> </div> </div> </div> <div class="container th_top"> <div class="row"> <div class="col-md-12"> <div class="xiangguan"> <ul class="msg msghead"> <li class="tbname">Related</li> </ul> <ul><li><a href="/Backend/79507.html">The university of new south wales COMP9021 QUIZ1 schoolwork </a></li><li><a href="/Backend/79506.html">The university of new south wales COMP9021 QUIZ1 schoolwork </a></li> </ul> </div> </div> </div> </div> <div class="container th_top"> <div class="row"> <div class="col-md-12"> <div class="flinks"> <ul> <li><i class="iconfont icon-x-tags"></i> Links:  </li> <li class="liflinks"><a target="_blank" href="/" title="CodePudding">CodePudding</a></li> </ul> </div> </div> </div> </div> <div class="footer"> <p><span style="font-size:16px;color:#666;font-weight: bold">About Us:</span>  <a href="https://www.codepudding.com/contact.html">Contact Us</a>      <a href="https://www.codepudding.com/service.html">Terms of Service</a>      <a href="https://www.codepudding.com/privacy.html"> Privacy Policy</a></p> <p class="foot_info">Copyright © 2010-2023,Powered By <a href="/" target="_blank">CodePudding</a> </p> </div> <script type="text/javascript" src="/skin/code/tianhu.js"></script> </body></html>