jquery not calling php function

For logged in users, use:

  • wp_ajax_{$action}

For logged out users, use:

  • wp_ajax_nopriv_{$action}

Your code is currently using wp_ajax_{$action} -> wp_ajax_nizam_handler which will restrict the request to logged in (authenticated users).

If you are logged out at the time of the request, you will never make it into your callback.

If you want to target logged out users add an action for the wp_ajax_nopriv_{$action} context.

Example:

function wpse_356672_nizam_handler_handler() {

    wp_send_json_success( [
        'results'  => 'MY_VALUE',
        'custom_property'  => 'ANOTHER_VALUE',
        // etc...
    ] );

}

add_action('wp_ajax_nizam_handler', 'wpse_356672_nizam_handler_handler' );
add_action('wp_ajax_nopriv_nizam_handler', 'wpse_356672_nizam_handler_handler' );

NOTE: you can use both hooks simultaneously OR one or the other, depending on your use case.

TIP: instead of using die it is recommended that you use wp_die but even more so wp_send_json_success, wp_send_json_error or wp_send_json.

Recommended Reading:

Aditional Reading (security):