My MySql database has two columns: name
and time
. I would like to display each value in a table that has this code:
<tr>
<td class="tg-yw4l">name</td>
<td class="tg-yw4l">time</td>
</tr>
I have already made the connection and the appropriate query to display all the values, but I do not know how to insert them into this html code.
<?php
session_start();
require_once "php/connect.php";
$polaczenie = new mysqli($host, $db_user, $db_password, $db_name);
if ($polaczenie->connect_errno != 0) {
echo "Error: " . $polaczenie->connect_errno;
} else {
@$polaczenie->query("SELECT * FROM ranking");
...
}
$polaczenie->close();
?>