这段代码工作正在我的Php myadmin上工作但不在我的实时数据库上显示“0结果”

Hi I'm login in from my log in screen to my reports this code work on my localhost but dose not want to work on my live dataBase can anyone tell me why I'm using FileZila

    <?php

SESSION_start();

require_once '../config.php';

/* Logining in the users */
if(isset($_POST['Login']) && $_POST['Login'] == 1){
    //print_r($_POST);

    //Variables
    $email = $_POST['Email'];
    $password = $_POST['Password'];

    // check if there is a user with the same password

    $sql = "SELECT * FROM afm_user WHERE Email = '$email' AND Password = '$password'";
    $result = mysqli_query($conn, $sql);
    // print_r($email);

    //print_r($result);die();

    if ($result->num_rows > 0) {
        // output data of each row
        while($row = $result->fetch_assoc() ) {
            $_SESSION['userEmail'] = $row['Email'];
            $_SESSION['userId'] = $row['id'];
        }
        header("Location: ../index.php");
    } else {
        echo "0 results";
    }

}

Hi I have addded this

    if ($result->num_rows > 0) {
        // output data of each row
        while($row = $result->fetch_assoc() ) {
            $_SESSION['userEmail'] = $row['Email'];
            $_SESSION['userId'] = $row['id'];
        }
        header("Location: ../index.php");
    } else {
        echo("0 results" . mysqli_error($conn));
    }

}

all that is showing is "0 results" if anyone can exsplaine why it works on myAdmin and not FileZila