I'm developing some additional functionality with a jQuery autocomplete form, some custom database tables, and PHP to query the tables.
I have it working outside of the WordPress framework using mysqli for the database part.
I've added the form to a WordPress page (and added the jQuery references to the header). When I run the Firefox Web Developer Web Console, I can see that the jQuery is doing its job up to the point of calling the PHP script.
My PHP script is in the root directory of my Genesis child theme.
The PHP script is where it hangs, and it appears that I'm not getting access to the information in
$wpdb. I executed this script in the same directory as a test:
<?php echo "got here"; global $wpdb; print_r($wpdb); ?>
I see "got here" but nothing else.
Is there something else I have to do to get access to
$wpdb? Apparently me declaring it
global isn't enough.