I guess, you are willing to check the encrypted password stored in database with md5 encryption is the one you are providing from user interface.I i am correct,then follow my code.
$user_name=$_POST['user_name'];
$rawpassword=$_POST['password'];
$password=md5($_POST['password']);
echo ("Entered password from user is:"+$rawpassword);
echo ("Entered password from user in encrypted form is:"+$password);
$con=mysql_connect("localhost","root","22646146");
mysql_select_db("bs",$con);
$query="select password from login where user_name='$user_name' and password='$password' LIMIT 1";
$result= mysql_query($query);
$finalObject=mysql_fetch_object($result);
if($finalObject.password == $password)
{
echo "Password verified" ;
}
else
{
echo "Password entered is wrong";
}
?>