connect_error) { die("Connection failed: " . $conn->connect_error); } $sql = "SELECT * FROM packages"; $result = $conn->query($sql); if ($result->num_rows > 0) { // output data of each row while($row = $result->fetch_assoc()) { echo "id: " . $row["id"]. " - content: " . $row["packege_name"]. " " . $row["content"]. "
"; } } else { echo "0 results"; } $conn->close(); ?>