<?php
include_once 'ISIKUD.php';
$result = mysqli_query($conn,"SELECT * FROM ISIKUD");
?>
<!DOCTYPE html>
<html>
 <head>
 <link rel="stylesheet" href="style.css">
 <title> Isikute Päring</title>
 </head>
<body>
<?php
if (mysqli_num_rows($result) > 0) {
?>
  <table>
  
  <tr>
    <td>Nimi</td>
    <td>Sugu</td>
    <td>Pikkus</td>
    <td>Kaal</td>
    <td>Sünniaeg</td>
  </tr>
<?php
$i=0;
while($row = mysqli_fetch_array($result)) {
?>
<tr>
    <td><?php echo $row["Nimi"]; ?></td>
    <td><?php echo $row["sugu"]; ?></td>
    <td><?php echo $row["pikkus"]; ?></td>
    <td><?php echo $row["kaal"]; ?></td>
    <td><?php echo $row["synniaeg"]; ?></td>
</tr>
<?php
$i++;
}
?>
</table>
 <?php
}
else{
    echo "Tulemusi ei leitud";
}
?>
 </body>
</html>