page3.php 1.25 KB
Newer Older
May's avatar
May committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
<?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'); ?>