Key is the MapReduce outcome key $results = requestView("auth/_design/chkauth/_view/authv1/",$username); if (count($results["rows"]) == 0){ //Username not found. echo "Username Not Found."; exit(0); } //Check if the password hash match if ($results["rows"][0]["value"] == $password){ echo "Password Correct"; }else{ echo "Password Incorrect"; } }else{ //Some parameter missing die("Username or Password not defined."); } ?>