<?php 

include 'connect.php';

$sql = "SELECT * FROM people";

// Executing the query and storing the result
$result = mysqli_query($conn, $sql);

// Checking if the query was successful
if (mysqli_num_rows($result) > 0) {
    // Outputting the data
    while ($row = mysqli_fetch_assoc($result)) {
        echo "ID: " . $row["id"] . " - Name: " . $row["firstname"] . "<br>";
    }
} else {
    echo "0 results";
}

// Close the connection
mysqli_close($conn);

?>