Csc317 Answer Scheme Apr 2008

  • November 2019
  • PDF

This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA


Overview

Download & View Csc317 Answer Scheme Apr 2008 as PDF for free.

More details

  • Words: 248
  • Pages: 3
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
Name:
Address:
Quantity:
Tshirt name: <select name="Tshirt_Name">
Do you have loyalty card? Yes


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; %>

Related Documents

Answer Scheme
October 2019 27
Answer Scheme Mac2019.docx
October 2019 23
Answer Scheme Quiz 1
May 2020 16