Download as pdf or txt
Download as pdf or txt
You are on page 1of 4

DEPARTMENT OF INFORMATION TECHNOLOGY AND

COMMUNICATION

DFP50193 WEB PROGRAMMING

LECTURER NAME

TYPE OF
Laboratory Task 2
ASSESSMENT

TOPIC 2.0 PHP Programming

DURATION 2 Hours

DATE OF
ASSESSMENT

NAME REGISTRATION NO.

INDIVIDUAL

MARKS
CLO1 /30
DFP50193: WEB PROGRAMMING

LABORATORY TASK 2

Construct the PHP program structure, file and directory


CLO 1 handling, database connectivity appropriately in developing P4, PLO 3
dynamic web page that connected to MySQL database.

A. OBJECTIVES

By the end of this assessment, student should be able :


i. to construct PHP Function.
ii. To apply session in webpage.

B. TOOLS

i. PHP Code Editor


ii. XAMPP Server (any version)

C. INSTRUCTIONS

i. Answer all the questions individually.


ii. Document submission must include an answer sheet, question, file.php.

Question 1 - Construct PHP Function

Create a function to calcuate the volume of Cylinder. The function should takes two parameters and
one constant value based on formula given as in Figure 1a. Execute and show your output as result
in Figure 1b.

Figure 1a

(15 marks)

Question 2 : Apply session in webpage.

Create three page of .php file as below:


i. First page should execute code to set session and store session variable as in result in
Figure 2a.
ii. Second page should execute code to check the data stored in session variable and display
all the value as in result in Figure 2b.
iii. Third page should execute code to destroy the session as in result in Figure 2c.

(15 marks)
D. RESULTS

Result For Question 1 - Construct PHP Function

Figure 1b

Result For Question 2 : Applu session in webpage

First Page Second Page Third Page

Figure 2a Figure 2c

Figure 2b

PREPARED BY : CHECKED BY : APPROVED BY:


(Course Lecturer) (Course Coordinator) (Head of Programme / Head of
Department)

NURHANI BINTI MOHD SABRI


…………………………… ……………………………… ………………………………
KETUA PROGRAM DDT
(ANIS FATIHA AHMAD SAHIMI (KAMAL APANDY JALIL (NURHANI
Jabatan TeknologiMOHD
Maklumat &SABRI)
Komunikasi
Politeknik Balik Pulau
@ SHUHAIMI ) APANDY ) Date :20/3/2024
Date : 19/3/2024 Date : 19/3/2024
RUBRIC FOR LABORATORY TASK 2

COURSE CODE: DFP50193


COURSE NAME: Web Programming
PRACTICAL TITLE: Construct PHP Function and apply session in webpage

REGISTRATION NO.:
NAME:

MARK WEIGHTAGE
CRITERIA MARKS
4 3 2 1 QUESTION 1 QUESTION 2
Demonstrates a thorough Shows a good understanding Understands parts of the Shows minimal understanding of the
understanding of the given of the problem, though some problem but lacks clarity problem, with significant confusion or
Understanding &
problem, accurately minor details or requirements on some key aspects. misinterpretation of requirements ____ X 1 ____ X 1 /8
Problem-solving
identifying key requirements might be overlooked.
and constraints.
Code executed without error, Code executed with minor Implements a solution but Attempts implementation but with
comply all requirements and error,easy to fix or meet 50% with significant syntax major syntax errors or code that does
Code Execution ____ X 1 ____ X 1 /8
well-organized. of the requirements. errors or inconsistencies. not execute. PHP conventions are
Code readability is poor. disregarded.
Successfully executed Successfully executed most Successfully executed but Unsuccessfully execute as expected
Output precisely as expected output precisely as expected output. far from expected output. output. ____ X 1 ____ X 1 /8
or beyond expectation.
Provides all submission Provides all submission Provides adequate submission of
Documentation documents with related .php document with unrelated answer sheet or .php file ____ X 2 /6
file’s name. .php file’s name.
TOTAL MARK /30

PREPARED BY : CHECKED BY : APPROVED BY:


(Course Lecturer) (Course Coordinator) (Head of Programme / Head of Department)

NURHANI BINTI MOHD SABRI


KETUA PROGRAM DDT
…………………………… ……………………………… ………………………………
Jabatan Teknologi Maklumat & Komunikasi
(ANIS FATIHA AHMAD SAHIMI @ SHUHAIMI ) (KAMAL APANDY JALIL APANDY ) (NURHANI MOHD
Politeknik SABRI)
Balik Pulau

Date : 19/3/2024 Date : 19/3/2024 Date :20/3/2024

You might also like