100%
ICT2613
EXAM PACK
DISTINCTION QUALITY
UNISA EXAM
, 2 ICT2613
October/November 2025
Question 1 [10]
1.1 What is PHP? (1)
Question 1
1.1 PHP stands for Hypertext processor, it is a servers-side scripting language that is used for developiing web applications.
1.2 What software is essential to execute PHP scripts? (1)
1.2 Apache and MySQL
1.3 If a file name ends with .php, can it contain HTML code? (1)
1.3 Yes
1.4 Name the web browser you have used in this module to complete the assignments. (1)
1.4 Mozilla Firefox
1.5 Name the database server you have used in this module to complete the assignments. (1)
1.5 MySQL
1.6 List the steps you have taken in order to publish your Assignment 2 on an Internet Server. Assume
that you have completed and tested all the tasks, including index.php, of Assignment 2 on your
local server. (5)
1.6 After coding all the tasks, and index page, I did the following:
(a) I registered for a free hosting plan on 000webhost.com and I was given a domain name
(b) I created a new database and user on the web server and I imported my local database to my web database phpmyadmin in my
cpanel
(c ) I uploaded my file to the file manager on my cpanel
(d) I changed my connection.php file database connection to match my web server details
(e ) I loaded up my domain name in my web browser and my website was active
[TURN OVER]
, 3
Question 2 [16]
Consider the PHP statement and answer the questions that follow:
echo 'Good luck with ICT2613 exam.';
2.1 Declare a camel case variable to store a module code and initialize it to ICT2613. Substitute this
newly declared variable in the echo statement. The echo statement should use single quotes (') and
the concatenation operator. (3)
$moduleCode = "ICT2613";
Echo 'Good luck with ' . $moduleCode . ' exam' ;
2.2 What is the purpose of the htmlspecialchars() function? (2)
2.2
The purpose of the htmlspecialchars function is to display html codes as if they were ordinary string
2.5
$mymodules = array("ICT2613", "ICT2612", "ICT1513");
2.3 Rewrite the echo statement you have written for question 2.1 to make use of the
htmlspecialchars() function. (1)
2.3
Echo Htmlspecialchars('Good luck with ' . $moduleCode . ' exam');
2.4 Rewrite the echo statement you have written for question 2.1 to make use of double quotes (")
without using the concatenation operator. (1)
2.4
echo "Good luck with $moduleCode exam ";
2.5 Declare and initialize an array with three module codes, ICT2613, ICT2612 and ICT1513. (2)
2.5
$mymodules = array("ICT2613", "ICT2612", "ICT1513");
, 4
2.6 Write a function that contains an echo statement to display the sentence, Good luck with
xxx exam., where xxx is substituted with the value passed to its parameter. (3)
function displayMessage($module){
Return "Good luck with $module exam";
2.7 Write a for loop that iterates through the array you have written for question 2.5, and invokes the
function you have written for question 2.6 for each module code in the array. (4)
foreach($mymodules as $module){
echo displayMessage($module) . "<br>";
Question 3 [14]
Study the code below and answer the questions that follow:
<form>
<label>Modules:</label> <br>
<input type="radio" name="module_code" value="ICT2613"> ICT2613
<input type="radio" name="module_code" value="ICT2612"> ICT2612
<input type="radio" name="module_code" value="ICT1513"> ICT1513
</form>
3.1 Draw the form displayed by the given code. (3)
[TURN OVER]
ICT2613
EXAM PACK
DISTINCTION QUALITY
UNISA EXAM
, 2 ICT2613
October/November 2025
Question 1 [10]
1.1 What is PHP? (1)
Question 1
1.1 PHP stands for Hypertext processor, it is a servers-side scripting language that is used for developiing web applications.
1.2 What software is essential to execute PHP scripts? (1)
1.2 Apache and MySQL
1.3 If a file name ends with .php, can it contain HTML code? (1)
1.3 Yes
1.4 Name the web browser you have used in this module to complete the assignments. (1)
1.4 Mozilla Firefox
1.5 Name the database server you have used in this module to complete the assignments. (1)
1.5 MySQL
1.6 List the steps you have taken in order to publish your Assignment 2 on an Internet Server. Assume
that you have completed and tested all the tasks, including index.php, of Assignment 2 on your
local server. (5)
1.6 After coding all the tasks, and index page, I did the following:
(a) I registered for a free hosting plan on 000webhost.com and I was given a domain name
(b) I created a new database and user on the web server and I imported my local database to my web database phpmyadmin in my
cpanel
(c ) I uploaded my file to the file manager on my cpanel
(d) I changed my connection.php file database connection to match my web server details
(e ) I loaded up my domain name in my web browser and my website was active
[TURN OVER]
, 3
Question 2 [16]
Consider the PHP statement and answer the questions that follow:
echo 'Good luck with ICT2613 exam.';
2.1 Declare a camel case variable to store a module code and initialize it to ICT2613. Substitute this
newly declared variable in the echo statement. The echo statement should use single quotes (') and
the concatenation operator. (3)
$moduleCode = "ICT2613";
Echo 'Good luck with ' . $moduleCode . ' exam' ;
2.2 What is the purpose of the htmlspecialchars() function? (2)
2.2
The purpose of the htmlspecialchars function is to display html codes as if they were ordinary string
2.5
$mymodules = array("ICT2613", "ICT2612", "ICT1513");
2.3 Rewrite the echo statement you have written for question 2.1 to make use of the
htmlspecialchars() function. (1)
2.3
Echo Htmlspecialchars('Good luck with ' . $moduleCode . ' exam');
2.4 Rewrite the echo statement you have written for question 2.1 to make use of double quotes (")
without using the concatenation operator. (1)
2.4
echo "Good luck with $moduleCode exam ";
2.5 Declare and initialize an array with three module codes, ICT2613, ICT2612 and ICT1513. (2)
2.5
$mymodules = array("ICT2613", "ICT2612", "ICT1513");
, 4
2.6 Write a function that contains an echo statement to display the sentence, Good luck with
xxx exam., where xxx is substituted with the value passed to its parameter. (3)
function displayMessage($module){
Return "Good luck with $module exam";
2.7 Write a for loop that iterates through the array you have written for question 2.5, and invokes the
function you have written for question 2.6 for each module code in the array. (4)
foreach($mymodules as $module){
echo displayMessage($module) . "<br>";
Question 3 [14]
Study the code below and answer the questions that follow:
<form>
<label>Modules:</label> <br>
<input type="radio" name="module_code" value="ICT2613"> ICT2613
<input type="radio" name="module_code" value="ICT2612"> ICT2612
<input type="radio" name="module_code" value="ICT1513"> ICT1513
</form>
3.1 Draw the form displayed by the given code. (3)
[TURN OVER]