PHP MySQL query SELECT error not finding existing table values

I am trying to make a web app, that searches by ID/Name input, Database A (client) for existing clients, IF the client exists display Database A(information data) and values on Database B (history of purchases from each client); if not it displays a form to add client to database A and after that add new purchase to database B.

So far this is my code:

index.php -> this is the search form:

<!DOCTYPE html>
<html>
    <head>
        <title></title>
    </head>
    <body>
        <form name = "inicio" action = "inicio.php">
        Mostrar equipamento de:<input type="text" name="user" value="" />
        <input type="submit" value="ir" />
        </form>
    </body>
</html>

this is the criteria for displaying Database info:

<!DOCTYPE html>
<html>
    <head>
        <meta charset="UTF-8">
        <title>ola</title>
    </head>
    <body>

       CLIENTES <?php //chama a ação de index.php
        echo htmlentities($_GET["user"])."<br/>";?>

        <?php
        //declarar variaveis
       $servername = "localhost";
       $username = "phpuser";
       $password = "phpuserpw";
       $dbname = "equipamento";
       $tablename = "clientes";
       $user = "user"; 

       //criar ligação
       $conn = mysqli_connect($servername, $username, $password, $dbname);
       //verifica licação
       if (!$conn) {
           die("Connection failed: " . mysqli_connect_error());  
       }


       //query
       $sql = "SELECT ID, Nome FROM clientes WHERE Nome='" . $user . "'";
       $result = mysqli_query($conn, $sql);


       if(mysqli_num_rows($result) !== 0) {
           //output data de cada fila
           while ($row = mysqli_fetch_assoc($result)) {
               echo "ID: " . $row["ID"]. " Nome: " .$row["Nome"]. "<br>";
           }
       }else {
           echo "O cliente não existe";
       }


     ini_set('display_errors', 1);
     ini_set('display_startup_errors', 1);
     error_reporting(E_ALL); error_reporting(-1);

       mysqli_close($conn);
       ?>

</body>
</html>

I believe the error reports to my query, but I am not experienced enough to understand what could be wrong.
Also, I have added error reporting script but it’s not displaying any errors.
Where should it display?

Thanks for any help.