SYST10199: Assignment 4 © Sheridan College Overview Databases Write an app that builds and modifies the sports.sql database provided: · Create 3 pages - an insert page, a delete page (by), and an...

1 answer below »
web


SYST10199: Assignment 4 © Sheridan College Overview Databases Write an app that builds and modifies the sports.sql database provided: · Create 3 pages - an insert page, a delete page (by), and an update page (by). · Each page redirects to a PHP program that attempts to perform the operation and display the result. · Don’t worry about security. · Create a 4th page that allows users to view the contents of the database. They should be able to choose the fields they see and either look up a single record or a range of records. · Note: you will have to add the capability to choose which fields will be displayed. The Rules · This is a primarily a programming task. The performance of your program will be judged on how well it meets the criteria outlined above rather than how pretty it looks. · There should be no bugs or errors in the JavaScript console. · The forms should meet the specifications listed above and you should put at least a little effort into its appearance, but you are not being graded on graphic design. · The HTML, CSS, JavaScript, database, and PHP should contain no warnings or errors when loaded in NetBeans. · The CSS and JavaScript should be loaded from separate files. · All files should have a header comment with a brief description and your name. Each JavaScript function and global variable should have a brief one line comment explaining what it does. Put this comment above the variable or function. · The main file should be called index.html and should be hosted on your mobile space. Submission Instructions - Please follow carefully 1. See the SLATE calendar for the due date. 2. Host on your cPanel web space at this address: http://dev.fast.sheridanc.on.ca/~yourusername/A# where # is the assignment number. 3. In SLATE, add a comment to the dropbox that includes your mobile web space address as a clickable link. 4. Zip up the entire project folder and hand it in the correct dropbox on SLATE. 
Zip files ONLY, do NOT submit .rar files. Evaluation 1. For each submission instruction not complied with, there will be a deduction of 0.5 marks. 2. Performance (4.5 marks): For each console error or bug or error in the application & any of the rules above not adhered to, there will be a deduction of 0.5 marks. 3. For each requirement not met there will be a deduction of 0.5 marks. 4. Internal Documentation (comment your code) 0.5 marks. This assignment is worth 10% of your final grade. Total marks 10. The work must be your own.
Answered Same DayApr 13, 2021

Answer To: SYST10199: Assignment 4 © Sheridan College Overview Databases Write an app that builds and modifies...

Pulkit answered on Apr 14 2021
137 Votes
PHP/database.php
$servername='localhost';
$username='root';
$password='';
$dbname = "sports";
$conn=mysqli_connect($servername,$username,$password,"$dbname");
if(!$conn){
die('Could no
t Connect My Sql:' .mysql_error());
}
?>
PHP/delete-process.php
include_once 'database.php';
$sql = "DELETE FROM sports WHERE userid='" . $_GET["userid"] . "'";
if (mysqli_query($conn, $sql)) {
echo "Record deleted successfully";
} else {
echo "Error deleting record: " . mysqli_error($conn);
}
mysqli_close($conn);
?>
PHP/delete.php
include_once 'database.php';
$result = mysqli_query($conn,"SELECT * FROM sports");
?>



Delete sports data











$i=0;
while($row = mysqli_fetch_array($result)) {
?>








$i++;
}
?>
Sports IdFirst NameLast NameFieldMedalAction
">Delete



PHP/insert.php

First name:


Last name:


Field Name:


Medal:



PHP/process.php
include_once 'database.php';
if(isset($_POST['save']))
{
$first_name = $_POST['first_name'];
$last_name =...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here