Probably just overlooking something small but its 5:30 am here so please forgive me.
$sql = "SELECT * FROM accounts WHERE username = $testuser";
$result = mysqli_query($conn, $sql);
if (!$result || mysqli_num_rows($result) > 0) {
// output data of each row
while($row = mysqli_fetch_assoc($result)) {
echo "id: " . $row["id"]. " - Name: " . $row["username"]. " " . $row["password"]. "<br>";
}
} else {
echo "0 results";
}