College of Computing and InformaticsAssignment 2
Deadline: Monday 30/01/2023 @ 23:59
[Total Mark for this Assignment is 8]
Student Details:
Name: ###
ID: ###
CRN: ###
Instructions:
• You must submit two separate copies (one Word file and one PDF file) using the Assignment Template on
Blackboard via the allocated folder. These files must not be in compressed format.
• It is your responsibility to check and make sure that you have uploaded both the correct files.
• Zero mark will be given if you try to bypass the SafeAssign (e.g. misspell words, remove spaces between
words, hide characters, use different character sets, convert text into image or languages other than English
or any kind of manipulation).
• Email submission will not be accepted.
• You are advised to make your work clear and well-presented. This includes filling your information on the cover
page.
• You must use this template, failing which will result in zero mark.
• You MUST show all your work, and text must not be converted into an image, unless specified otherwise by
the question.
• Late submission will result in ZERO mark.
• The work should be your own, copying from students or other resources will result in ZERO mark.
• Use Times New Roman font for all your answers.
Question One
Pg. 01
Learning
Outcome(s):
CLO1: Describe
methods and
tools in designing
a creative and
dynamic website.
Question One
Write SQL queries that perform each of the following tasks:
a) List all students first names and last names of IT405 course in Riyadh branch.
b) List all students female ordered by branch name who pass IT405 course with
more than or equal 70 (i.e., C) grade.
Answer:
CLO3: Create
web databases
using MySQL
2 Marks
Question Two
Pg. 02
Learning
Outcome(s):
CLO1: Describe
methods and
tools in designing
a creative and
dynamic website.
CLO4: Build web
applications using
PHP and MySQL
Question Two
2 Marks
What are the benefits of using your own error-handling function? And write a
custom error handler script example.
Answer:
Question Three
Pg. 03
Learning
Outcome(s):
Question Three
What is header function in PHP? Then explain the following script.
CLO1: Describe
methods and
tools in designing
a creative and
dynamic website.
Answer:
2 Marks
Question Four
Pg. 04
Learning
Outcome(s):
CLO1: Describe
methods and
tools in designing
a creative and
dynamic website.
Question Four
2 Marks
Consider the following PHP script for creating a session with name and ID. Write a
PHP script to retrieve and print the session global variables, then delete the session.
CLO4: Build web
applications using
PHP and MySQL
Answer: