how to encrypt the password in mysql using md5 : <pre><code>public function login($email, $password){
    $stmt = $this-&gt;pdo-&gt;prepare("SELECT 'user_id' FROM 'users' WHERE 'email'=:email AND 'password' = :password");
$stmt-&gt;bindParam(":email", $email, PDO::PARAM_STR);
$stmt-&gt;bindParam(":password", md5($password), PDO::PARAM_STR);
$stmt-&gt;execute();
$user = $stmt-&gt;fetch(PDO::FETCH_OBJ);
$count = $stmt-&gt;rowCount();

if($count &gt;0){
 $_SESSION['user_id'] = $user-&gt;user_id;
 header('Location: home.php');
}else{
 return false;
}
}
</code></pre>

<p>by using md5 in password I am getting an error :
 Only variables should be passed by reference in D:\xammp\htdocs\twitter\core\classes\user.php on line 18</p>

<p>and on removing md5, I am getting error for invalid password though I am entering the correct password as in database.</p>
