<style> table { width: 50%; border-collapse: collapse; } th, td { border: 1px solid black; padding: 8px; text-align: left; } th { background-color: #f2f2f2; } </style> <?php echo "Rujira Thongklung 65160015"; //<?php $servername = "db"; $username = "demo"; $password = "Noon+020347"; //Create connection $conn = new mysqli($servername, $username, $password); // Check connection if ($result->num_rows > 0) { // output data of each row while($row = $result->fetch_assoc()) { echo "id: " . $row["id"]. " - Name: " . $row["fname"]. " " . $row["lname"]. "<br>"; } } else { echo "0 results"; } $conn->close(); ?>