
    <?php 
        require_once 'includes/process.php';
    ?>

<div class="row justify-content-center">
      <table class="table">
        <tr>
          <td>Image</td>
          <td>Description</td>
        </tr>
            <?php //selects all recordsd from the table / izvēlas visus datubāzes ierakstus
              $records = $conn->query("SELECT * FROM gallery") or die($mysqli->error()); 
              while ($row = $records->fetch_assoc()):
              ?>
                  <tr> <!--outputs images & fname to website / izvada bildes un apraksta laukus mājaslapā-->
                  <td><img src="<?php echo $row['images']; ?>"></td>
                  <td><?php echo $row['fname']; ?></td>
                  </tr>	
            <?php
            endwhile;
            ?>
      </table>
</div>