title: What is the best way to sanitize POST data?
body: <p>I am working on a WordPress plugin and need to sanitize the POST data within this function. Would sanitize_text_field() be the best way to go about it? Also what is the proper way to add it to the code below?</p>
  
  <pre><code>header( 'Content-Type: application/json' );
  
          global $wpdb;
  $session_id = $_POST['session_id'];
          $procedure_name =  $wpdb-&gt;prefix . 'get_geojson_route';
          $gps_locations = $wpdb-&gt;get_results($wpdb-&gt;prepare(
              "CALL {$procedure_name}(%s);", 
              array(
                  $session_id
              )
          )); 
  </code></pre>