<?php include('layouts/header.php'); ?>
<div class="container">
	<table class="table table-bordered">
	  <thead>
	    <tr>
	      <th scope="col" class="text-center"></th>
				<th scope="col" class="text-center">สายพันธุ์</th>
				<th scope="col" class="text-center">ช่วงอายุ</th>
	    </tr>
	  </thead>
	  <tbody>
			<?php
			$sql = "select * from dogs";
			$result = mysqli_query($conn, $sql);
			if (mysqli_num_rows($result) > 0) {
				while($row = mysqli_fetch_assoc($result)) {?>
					<tr>
						<td class="text-center"><img src="<?= $row['picture'] ?>" alt="" width="200px"></td>
						<td class="text-center"><?= $row['breed'] ?></td>
						<td class="text-center"><?= $row['age'] ?></td>
					</tr>
					<?php
				}
			}
			mysqli_close($conn);
			?>
	    <!-- <tr>
	      <td>Mark</td>
	      <td>Otto</td>
	      <td>@mdo</td>
	    </tr> -->
	  </tbody>
	</table>
</div>
<?php include('layouts/footer.php'); ?>