100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached 4.2 TrustPilot
logo-home
Other

2020 ICT2613 S1 Assignment 3

Rating
-
Sold
1
Pages
21
Uploaded on
06-07-2021
Written in
2020/2021

This is assignment 3 for year 2020 semester one

Institution
Course










Whoops! We can’t load your doc right now. Try again or contact support.

Connected book

Written for

Institution
Course

Document information

Uploaded on
July 6, 2021
Number of pages
21
Written in
2020/2021
Type
Other
Person
Unknown

Subjects

Content preview

Internet Programming
ICT2613
Semester 1
Assignment 3 php only answers

,Task 1, page name: task1.php, chapter: 2, marks: 15
Generate the following statement by adhering to the instructions given below:
I am registered for ICT2613 in 2020. ICT2613 has 3 assignments.
• Create three variables to store the values displayed in bold. Use camel case
variable names.
• The output should be generated (including bold) using an echo statement. No
need to
display the output in Courier New font.
• Note that the values linking the bold words with one another (for example "I am
registered
for") are not part of the variable declarations.

Task 2, page name: task2.php, chapters: 2 & 7, marks: 20
Create a form to facilitate registration of participants for a hackathon. The form
should contain
the following:
• Two text fields to input the name and the e-mail address of the participants
• Three checkboxes with options Project Leader, Programmer and Tester. A
participant
should choose at least one but they can choose all three roles as well.
• A drop-down list to input one of these dietary requirements: None, Vegetarian,
Vegan,
Halaal and Banting. A participant can only choose one of these options.
• A submit button

Task 3, page name: task3.php, chapters: 3 & 4, marks: 15
Create a database with one table modules. Create the following columns for the
modules
table:
code, which is the primary key for storing unique 7-character module codes
name, which stores the names of the modules
lecturer, which stores the primary lecturers of the modules

Task 4, page name: task4.php, chapters: 3, 4 & 7 marks: 25
Connect to the database created in task 3.
Present the data in the modules database table in a HTML table format on the web
page.
Provide three different forms on the task page to add, to update and to delete from
the
modules database table. Details of the forms are given below:

, TASK 1 :
<?php
// assign variables
$courseCode = 'ICT2613';
$currentYear = '2020';
$numAssignments = 3;


echo 'I am registered for <b>' . $courseCode . '</b> in <b>' . $currentYear .
'</b>. <b> ' .
$courseCode . '</b> has <b>' . $numAssignments . '</b> assignments.';
?>




TASK 2 :
<?php
// assign variables
$firstLoad = filter_input(INPUT_POST, 'firstload');
if (!isset($firstLoad)) {$firstLoad = TRUE;}


$isValid = TRUE;
$isValidEmail = TRUE;


//get values from POST array
$name = filter_input(INPUT_POST, 'name');
$email = filter_input(INPUT_POST, 'email', FILTER_VALIDATE_EMAIL);
$role = filter_input(INPUT_POST, 'role', FILTER_SANITIZE_SPECIAL_CHARS,
FILTER_REQUIRE_ARRAY);
$foodtype = filter_input(INPUT_POST, 'foodtype');


//check if all values are filled and/or valid except on first load of page
$allValid = FALSE;
if ($firstLoad !== TRUE) {

Get to know the seller

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
nolwandle University of South Africa (Unisa)
Follow You need to be logged in order to follow users or courses
Sold
52
Member since
6 year
Number of followers
47
Documents
14
Last sold
2 year ago

4.0

11 reviews

5
4
4
4
3
2
2
1
1
0

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Frequently asked questions