I'm building an app when i'm able to hash user passwords by using MD5. For the insertion it works correctly, but when i'm authenticating, it tells me the password is wrong
require_once('connect.php');
$data = json_decode(file_get_contents("php://input"));
$email = ($data->email);
$password = ($data->password);
$row = $conn->query("
SELECT *
FROM user
WHERE email='".$email."'
AND password='".md5.$password."'
");
$row->setFetchMode(PDO::FETCH_ASSOC);
$userdetails = $row->fetchAll();
$user = $row->rowCount();
$error_message=array("message"=>("wrong"));
if ($user == 0) {
echo json_encode($error_message);
} else {
session_start();
$_SESSION['user']=$userdetails;
echo json_encode($userdetails);
}