Please use the available API – as you have it in your question I could take down your entire site in a second. (I wrote this tutorial on Data Sanitization and Validation – the last section is particular relevant to you).
As for it not inserting the data, you should check WP_DEBUG
is turned on, and also print what $wpdb->query( $sql )
responds. But in any case, its much better (safter & neater) to do the following:
$wpdb->insert(
'ppm_hoopsandhits_locations',
array(
'locale' => $values['locale'],
'locale_city' => $values['locale_city']
'locale_state' => $values['locale_state']
),
array( '%s', '%s', '%s' )
);
where the ‘locale’, ‘locale_city’, etc are the name of the columns.
Also if this is for public release you should prefix your table name with $wpdb->prefix
so that there aren’t problems when multiple wordpress installs are present in the same database.