added validate_password to php