Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if(isset($_POST['address']) && $_POST['address'] != '') {
- $user_search = esc_attr($_POST['address']);
- function get_address() {
- global $wpdb;
- global $user_search;
- $address_table = $wpdb->prefix . "address_table";
- $query = $wpdb->get_col('SELECT json FROM ' . $address_table . 'WHERE address = ' . $user_search);
- $result = array();
- $result['lat'] = $query->results[0]->geometry->location->lat;
- $result['long'] = $query->results[0]->geometry->location->lng;
- return $result;
- }
- $latlong = get_address();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement