catalog.html
T-Shirts Online T-Shirts Online Sdn. Bhd. T-Shirt Name | Price(RM) |
Mons-oon | 39.90 |
Blue Wave | 49.90 |
Green The Earth | 52.90 |
Click here to order
order.asp < %@LANGUAGE="JAVASCRIPT"% >
Order
orderProcess.asp <%@LANGUAGE= "JAVASCRIPT"%>
<% var DSN="DSN=Sales"; var conObj=Server.CreateObject("Adodb.Connection"); conObj.Open(DSN) ; var name=Request.Form("name"); var address=Request.Form("address"); var quantity=parselnt(Request.Form("quantity")); var loyal= Request.Form("loyal"); var tshirtname =parseFloat(Request.Form("Tshirt_Name")); var subtotal, grand_total; subtotal = tshirtname* quantity; if(subtotal > 150 ) grand_total = subtotal ; else grand_total= subtotal + 10; if (loyal == "Yes") grand_total = grand_total - (0.05 * grand_total); Response.Write("Grand total is RM " + grand_total); Response.Write("
Thank you for shopping with us. Please come again.") var sqlStr; sqlStr= " Insert Into SalesOrdervalues (' " + name + " ' , ' " + address + " ' , ' " + quantity + " ' , ' " + device + " ' , ' " + loyal + " ' ) "; conObj .Execute (sqlStr) ; conObj.Close () ; conObj=null; %>