Ajax url value to pass ‘variable’ to use in query

You say that the page URL is http://localhost:8888/dev_wordpress/wp-admin/admin.php?page=mfgroups&mingleforum_action=usergroups&do=add_user_togroup but you are trying to load http://localhost:8888/tankards_wordpress/wp-admin/wpf-addusers.php?usergroup=The+Freedom. Those don’t match is a number of ways, but I am not 100% sure what the relationship between the two is. Your question is not clear in that respect.

However, even if you got that .php file to load via direct access like that– http://localhost:8888/tankards_wordpress/wp-admin/wpf-addusers.php?usergroup=The+Freedom–, it wouldn’t work. If you load the file directly like that WordPress does not load, meaning that WordPress functions will not be defined, and that file depends on WordPress functions.

You should be using the AJAX API for this, as for nearly all AJAX used in a WordPress context– cases needing extreme performance possibly excluded.

Write your PHP into a callback function like this:

add_action('wp_ajax_my_action', 'my_action_callback');

function my_action_callback() {
    // your PHP
    die(); // this is required to return a proper result
}

And pass my_action as part of your AJAX POST data, like this:

var data = {
    action: 'my_action',
    whatever: 1234
};

// since 2.8 ajaxurl is always defined in the admin header and points to admin-ajax.php
$.post(ajaxurl, data, function(response) {
    alert('Got this from the server: ' + response);
});

(Both example code blocks more or less cribbed from the Codex)