The dbconn.php file contains boilerplate code for connecting to a MariaDB/MySQL DBMS. Modify this file as
Question:
The dbconn.php file contains boilerplate code for connecting to a MariaDB/MySQL DBMS.
• Modify this file as instructed to set the appropriate database name, username, and password.
• This file can be included in any PHP file that requires a database connection, which you will do shortly.
The participants.php file contains skeleton HTML and a placeholder for PHP code.
• Add the necessary PHP code to the file to query the database for a list of all participants.
o Use this query: SELECT firstName, lastName, DOB, gender FROM Participant;
o You may wish to run the query in phpMyAdmin first to see the expected output.
o Hint: You will need to use a loop to iterate over each of the returned rows.
• The first thing you will need to do is include the dbconn.php file to establish a connection to the database.
o Hint: You can use the require or require_once statement to achieve this.
• Display the participants in a table as depicted in the image below.
o You will need to consider how to produce the required HTML for the table.
▪ Styling is not required for this activity
o The record you added for yourself should appear as the top row.
o Note the order the data is returned in does not necessarily have to be the order it is displayed in.
This is the sql that I've uploaded on the database
The dpconn.php looks like this:
Error: Unable to connect to database."; echo "Debugging errno: " . $ex->getCode() . "
"; echo "Debugging error: " . $ex->getMessage() . "
"; exit; }
And down here is the participants.php:
Supplementary Task
All I need to do is to finish both php files.
Income Tax Fundamentals 2013
ISBN: 9781285586618
31st Edition
Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill