Where should AJAX files go?
I've got some functions in general.
js that need to GET some info via xmlHttpRequests. What would be the best practice for targetting the php file that handles the request?
Code:
xmlhttp.open("GET","http://www.mainurl.www/ajax_postform.php?country="+document.mainform.cp_country[document.mainform.cp_country.selectedIndex].value,true);
I'd rather not put it in the root directory as above. When I do so, the php file doesn't seem to be able to instantiate a globalized $wpdb and I can't call any of its functions. Where should I drop this ajax_postform.php file so that it's easily written in my
js, and can also obtain the global $wpdb?