I have been working on a login page and my code has not been working, does anyone have any tips or ideas on what i should do. When I echo num_rows it displays 0, instead of the number of rows actually in the database.
$Email = mysqli_real_escape_string($dbc, trim($_POST['Email']));
$Password = mysqli_real_escape_string($dbc, trim($_POST['Password']));
//Look up the email and password in the database
$query = "SELECT * FROM Users WHERE Email = '$Email' AND Password = MD5('$Password')";
$data = mysqli_query($dbc, $query);
$count = mysqli_num_rows($data);
echo "Num of Rows: " . $count . "<br/>";