You are on page 1of 1

JFN INSTITUTE OF TECHNOLOGY

REPUBLIC OF CAMEROUN PO. Box 3712 Douala – Cameroon


MINISTRY OF HIGHER EDUCATION Tel: +237 233 43 43 43 / 680 06 60 15
Email: info@jfn-it.com
Web: www.jfn-it.com

CA 2 WEB DESIGN, SEMESTER 1


HND SOFTWARE ENGINEERING 3 HOURS FULLY PRATICAL
IVAN TCHOFFO, CS Eng
Your are called to build a Web system for sales in a shop. A bill has the following record:

Item_Ref Item_Names Item_Price Qty


1 VH002 Rice (KG) 550 10
2 VH012 Soap (400g) 350 5
3 OH015 Iron Sponge 100 5
4 OV120 Vegetable Oil (5L) 6500 1
5 VH102 Chocolate (800g) 3800 2
6 OH011 Liquide Soap (1L) 1500 2

Practical 1 (7Mks)
Write a PHP Script that compute the total price of a given item in the record table. The record
will be a one dimension table variable name $item_tab. Data of that $item_tab will be set
manually in the script. And the result will be given with the item reference, name, unique
price, quantity and total price.
Example:
If the variable $item_table has the value corresponding to Item line No 3 in our record table,
the result will be as follow on the web Page:
Item_Ref Item_Names Item_Price Qty Total
OH015 Iron Sponge 100 5 500

Practical 2 (5 Mks)

Create a database corresponding to the record table given up. Data base name should be
store_DB and the record table name is item_tab.
NB: Write the creation SQL script for the table item_tab in a file same CA Script.sql (but
creation of the database can done using the DBMS PhpMyAdmin)
Pratical 3 (8 Mks)
1- Write a PHP Script to insert and item line in the item_tab table in the score_tab
database (4Mks)
2- Write a PHP script that read all the item in item_tab table and give the following
result: (4Mks)

Item_Ref Item_Names Item_Price Qty Total


VH002 Rice (KG) 550 10 5500
VH012 Soap (400g) 350 5 1750
OH015 Iron Sponge 100 5 500
OV120 Vegetable Oil (5L) 6500 1 6500
VH102 Chocolate (800g) 3800 2 7400
OH011 Liquide Soap (1L) 1500 2 3000

You might also like