<?php include('layouts/header.php'); ?>
<div class="container">
	<table class="table table-bordered">
	  <thead>
	    <tr>
	      <th style="width: 20%;" scope="col"  class="text-center"></th>
				<th style="width: 15%;" scope="col" class="text-center">สายพันธุ์</th>
				<th style="width: 20%;" scope="col" class="text-center">ลักษณะทั่วไป</th>
				<th style="width: 25%;" scope="col" class="text-center">การดูแลสุนัข</th>
				<th style="width: 20%;" 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><?= $row['general'] ?></td>
						<td><?= $row['care'] ?></td>
						<td><?= $row['should know'] ?></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'); ?>
