<?php
$db = mysqli_connect('localhost', 'root', '', 'smoki');
?>
<!doctype html>
<html lang="pl">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Kwerenda 1</title>
    <style>td, th, table { border: 1px black solid; border-collapse: collapse}</style>
</head>
<body>
<h2>Kwerenda 1</h2>
<p>Kwerenda: <code>SELECT nazwa,dlugosc,szerokosc FROM smok WHERE pochodzenie = 'Polska';</code></p>
<?php
$query = "SELECT nazwa,dlugosc,szerokosc FROM smok WHERE pochodzenie = 'Polska';";

$result = mysqli_query($db, $query);
echo "<table>";
echo "<tr><th>Nazwa</th><th>Dlugosc</th><th>Szerokosc</th></tr>";
while ($row = mysqli_fetch_assoc($result)) {
    echo "<tr>";
    echo "<td>" . $row['nazwa'] . "</td><td>" . $row['dlugosc'] . "</td><td>" . $row['szerokosc'] . "</td>";
    echo "</tr>";
}
echo "</table>";
?>
</body>
</html>

<?php
mysqli_close($db);