Escrito por estudiantes que aprobaron Inmediatamente disponible después del pago Leer en línea o como PDF ¿Documento equivocado? Cámbialo gratis 4,6 TrustPilot
logo-home
Document preview thumbnail
Vista previa 3 fuera de 21 páginas
Otro

2020 ICT2613 S1 Assignment 3

Document preview thumbnail
Vista previa 3 fuera de 21 páginas

This is assignment 3 for year 2020 semester one

Vista previa del contenido

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

Libro relacionado
 image
Joel Murach, Ray Harris Murach\'s PHP and MySQL
Editorial: 2014 ISBN: 9781890774790 Edición: Desconocido

Información del documento

Subido en
6 de julio de 2021
Número de páginas
21
Escrito en
2020/2021
Tipo
Otro
Personaje
Desconocido
$9.88

¿Documento equivocado? Cámbialo gratis Dentro de los 14 días posteriores a la compra y antes de descargarlo, puedes elegir otro documento. Puedes gastar el importe de nuevo.
Escrito por estudiantes que aprobaron
Inmediatamente disponible después del pago
Leer en línea o como PDF

Seller avatar
Los indicadores de reputación están sujetos a la cantidad de artículos vendidos por una tarifa y las reseñas que ha recibido por esos documentos. Hay tres niveles: Bronce, Plata y Oro. Cuanto mayor reputación, más podrás confiar en la calidad del trabajo del vendedor.
nolwandle
4.0
(11)
Vendido
52
Seguidores
47
Artículos
14
Última venta
3 año hace



Por qué los estudiantes eligen Stuvia

Creado por compañeros estudiantes, verificado por reseñas

Calidad en la que puedes confiar: escrito por estudiantes que aprobaron y evaluado por otros que han usado estos resúmenes.

¿No estás satisfecho? Elige otro documento

¡No te preocupes! Puedes elegir directamente otro documento que se ajuste mejor a lo que buscas.

Paga como quieras, empieza a estudiar al instante

Sin suscripción, sin compromisos. Paga como estés acostumbrado con tarjeta de crédito y descarga tu documento PDF inmediatamente.

Student with book image

“Comprado, descargado y aprobado. Así de fácil puede ser.”

Alisha Student

Preguntas frecuentes