query($sql); if($result->num_rows){ $result = $result->fetch_assoc(); $hash = $result["hash"]; } else { $conn->close(); header("400 Bad Request", true, 400); exit(); } # Verifies password if(!password_verify($password, $hash)){ $conn->close(); header("400 Bad Request", true, 400); exit(); } # Returns 200 $conn->close(); header("200 OK", true, 200); exit(); } else { header($_SERVER["SERVER_PROTOCOL"]." 405 Method Not Allowed", true, 405); exit(); } ?>