I am new to MySQL and I am facing difficulties to get mysqli query to work. I can connect to the database and query on development machine of which everything seeks to work but the query returns no data on capnel. I have read related post on this issue and none of them seems to solve the issue. I really want to know if this is a hosting flaw, PHP version error or my code. Below is my database connection and the query.
<?php
define("DB_SERVER", "localhost");
define("DB_USER", "myuser");
define("DB_PASSWORD", "mypassword");
define("DB_DATABASE", "mydatabase");
$conn = mysqli_connect(DB_SERVER, DB_USER, DB_PASSWORD, DB_DATABASE);
?>
$email = mysqli_real_escape_string($conn, $_POST['email']);
$password = mysqli_real_escape_string($conn, $_POST['password']);
$sql = "SELECT * FROM 'sbausers' WHERE email = '$email' AND Password = '$password'";
$stmt = mysqli_query($conn, $sql);
$row = mysqli_fetch_array($stmt);
if ($row > 0){
echo 'it works';
} else {
echo 'it doesn't work';
}