+1 vote
by
Hello, what am I doing wrong? I can't get the data from the database to the page.
<?php

include "databases.php";

$result = mysqli_query($link,"SELECT * FROM `goods`");



while ($goods = mysqli_fetch_assoc($result))
{
echo $goods['price'];
echo "<br>";
}

?>
A screenshot of the database: 3DOsofI.png

1 Answer

0 votes
by
 
Best answer
1. Add lines to the very beginning of the databases.php file
ini_set('display_errors',1);
error_reporting(E_ALL);
mysqli_report(MYSQLI_REPORT_ERROR | MYSQLI_REPORT_STRICT);
2. Read How to find an error in your code And in general, stop asking "how to do this and that" when you already know how to do it. Instead, ask, "how do I find a bug in my code?" And see point 2 right away.
...