Simple shopping cart example

xiaoxiao2021-03-05  29

book < / b>
author
publishing house
Publishing date
< B>
price
Remarks
Buy
number <% while (sure.rs.next ()) {string bid = sure.rs.getstring ("bookid"); string txtval = request.getParameter "TXT" BID);%>
<% = sure.rs.getstring ("BookName")%>
<% = sure.rs.getstring ("author")%>
<% = sure.rs.getstring ("publish")%>
<% = sure.rs.getstring ("pdate")%>
< % =

Sure.rs.Getfloat ("Price")%>

<% = sure.rs.getstring (" MEMO ")%>
value = <% = txtval%> checked>
< DIV>
value = <% = txtval% >> < / TR> <%} Sure.discon (); // Disconnect the database connection%>
& nbsp & nbsp

Buy.jsp

Title
author
Publishing House
Published Date < TD>
Number
total < / b> <% resure.allproduct (); // Show all items float total = 0.0f; while (resure.rs.next ()) {string bid = resure.rs.getstring "bookid"); string txtval = request.getParameter ("txt" bid); // Quantity String ckval = request.getParameter ("CK" BID); if (ckval! = null) {Int num = integer.parseint (txtval);%>
<% = resure.rs.getstring ("bookname")%>
<% = resure.rs.getstring ("author")%>
<% = resure.rs.getstring ("publish")%>
<% = resure.rs.getstring ("pdate")%>
<% =

转载请注明原文地址:https://www.9cbs.com/read-34045.html

New Post(0)
CopyRight © 2020 All Rights Reserved
Processed: 0.035, SQL: 9