okay guys so i was just writing the code for an admin panel just for fun, and i ran into a problem when i copied some code from w3schools. Can someone tell me where i am wrong.
Here's My Code
    <?php
  $conn = mysql_connect("localhost", "root","","ATFlogin");
$sql = "SELECT id, username, password FROM users";
$result = $conn->query($sql);
if ($result->num_rows > 0) {
    while($row = $result->fetch_assoc()) {
        echo "<br> id: ". $row["id"]. " - Name: ". $row["firstname"]. " " . $row["lastname"] . "<br>";
    }
} else {
    echo "0 results";
}
?>
 
    