Question: How would I make it all work together, the way it should? Create a page that will display all records from any one table from
How would I make it all work together, the way it should?
Create a page that will display all records from any one table from any database you have created in this chapter. Name this page getRecords.php and be sure to include any necessary accompanying files.
Here is what I have for my data base:

Here is my code:
// Create connection $conn = new mysqli($servername, $username, $password,$dbname); // Check connection if ($conn->connect_error) { die("Connection failed: " . $conn->connect_error); } ?>
table {
font-family: 'Poppins', sans-serif;
border-collapse: collapse;
width: 100%;
}
td, th {
border: 2px solid #0a85ff;
text-align: left;
padding: 10px;
color: #0a85ff;
background-color: #eedcfc;
}
tr{
background-color: #dcf7f1;
}
h1 { color: #0a85ff; }
body { background-color: #dcf7f1; }
Display Records
| Treatment Id | Start Date | Start End | Product Name | Product Quanity | |
|---|---|---|---|---|---|
| ".$row['medications']." | ".$row['treatmentID']." | ".$row['startDate']." | ".$row['endDate']." | ".$row['productName']." | ".$row['productQuanity']." | >
| ".$row['medications']." | ".$row['treatmentID']." | ".$row['startDate']." | ".$row['endDate']." | ".$row['productName']." | ".$row['productQuanity']." |
_ P localhost/127.0.0.1 / doctorwho X 23 Display Records x + AE : { C http://localhost/phpmyadmin/sql.php?db=doctorwho&table=medications&xpos=0 a Amazon.com eBay Facebook YouTube Lenovo phpMyAdmin - Server 127.0.0.1 Database: doctorwho > Table: medications . > >> B Browse Structure SQL Search Insert Export Import mi Privileges Operations Tracking 36 Triggers Recent Favorites A Current selection does not contain a unique column Grid edit, checkbox, Edit, Copy and Delete features are not available. New doctorwho Showing rows 0 - 2 (3 total, Query took 0.0012 seconds.) New SELECT * FROM medications Profiling [Edit inline] ( Edit ] [ Explain SQL][ Create PHP code ] [ Refresh] Show all Number of rows: 25 V Filter rows: Search this table billing medications - patients patient_demographic_info information_schema mysql performance_schema +- phpmyadmin +- test + Options treatmentID startDate endDate productName 2234 2021-02-21 2021-02-27 Option A 2234 2021-02-21 2021-02-27 Option A 2234 2021-02-02 2021-02-08 Option A productQuanity 1 1 10 Show all Number of rows: : 25 Filter rows: Search this table Query results operations Print i Copy to clipboard Export Display chart Create view Bookmark this SQL query Label: O Let every user access this bookmark Console Type here to search O ir L 3 99+ 18%
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
