• Wrong document? Swap it for free
  • Written by students who passed
  • Immediately available after payment
  • Read online or as PDF
Sell
Where do you study
Your language
Document preview thumbnail
Preview 3 out of 21 pages
Other

2020 ICT2613 S1 Assignment 3

Document preview thumbnail
Preview 3 out of 21 pages

This is assignment 3 for year 2020 semester one

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) {

Connected book
 image
Joel Murach, Ray Harris Murach\'s PHP and MySQL
Publisher: 2014 ISBN: 9781890774790 Edition: Unknown

Document information

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

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

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
4.0
(11)
Sold
52
Followers
47
Items
14
Last sold
3 year ago



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

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions