IT (Q)

profilearsasi580
it2_41.pdf

IT-­‐230  Web  Technologies  

 Assignment  #4  

Due  Date:  the  5th  of  December  2015.  

Copied  answers  will  get  Zero  mark  

 

Q1:  (1  Mark)  

Differentiate  Buffered  and  Unbuffered  Queries.  

 

Q2:  (3  marks)  

Create an order.php page that will have a form, which takes in: a) Name (text) b) Address (textarea) c) 3 Items. Each item has 2 text input fields: − Item 1 : Name and Price − Item 2 : Name and Price − Item 3 : Name and Price d) Discount: (select tag: “5%; 10%; 15%”) Submit value as 5, 10, or 15. e) Submit button (“Place Order”)

 

Upon submission, the data is passed to a page called bill.php which processes the order. All amounts must be formatted to display as proper Saudi Riyal values, with SAR letters and correct precision. bill.php does the following: Calculate Total: = “Item 1 Price” + “Item 2 Price” + “Item 3 Price” Calculate Discount: = Passed Discount / 100 ex: 10/100 Calculate Discount Amount = Total * Discount Calculate  Total  Bill:  =  Total  –  (Discount  Amount)  

Displays the Name Displays the address, with all the html tags stripped out. Displays items ordered, Name and Price Display Total price, Discount price, and the Discount Percent. Display  Total  Bill.  

Sample Output: Name: Bob Smith Ship To: 1 Main St. Toronto, Ontario Order: SAR 10.99 Radio SAR 25.49 Ethernet Cable SAR 45.99 USB Key Summed Total: SAR 84.47 Discount: (15%) SAR 12.38 Bill Total: SAR 72.10