Actually, you did not add the error reporting I suggested. That would have been the most helpful change to have made.
That error reporting would identify if you have an error in statement for connecting to your database for example. You don't yet have a test to see if that works.
You wonder if it is your MySQL version, I doubt it.
I have not lodged the changes in MySQL by version in my memory. Your PHP 7 supports MySQL 5.1 and above, your screenshot from the phpMyAdmin home page shows your PHP has the "mysqli" component for MySQL 5.6, and it shows your database server is running 5.7, You could contact your host and get them to offer more up-to-date PHP components and MySQL components. Actually, it would be best if your host can offer you the latest stable PHP 8.1, and whatever is the latest stable database server.
The bulk of your script after the connect works as your query was tested with my PHP 8.1.14, my MariaDB 10.3.34, and my cumulus database.
Your database is fine, and the new error condition is not triggered.
There are no date handling bugs in the PHP 7.3.33 you are running, so the other change you did make has no effect.
You could simplify your while loop for any future test:
Code: Select all
while($row = $result->fetch_assoc()) {
echo "<th style='border-bottom:2px solid #8f8f8f;'>" . print_r($row) . "</th>";
}
By the way, for a small file, you don't need to zip it, and readers then don't need to unzip it, just add a ".txt" extension (something like "7dcomphtitcumx.php.txt") and the forum will accept the file.