title: Pass PHP Variables from one plugin file to another WordPress
body: <p>I am working on a WordPress plugin and have run into a little road block. I am working on a part of the script that interacts with PayPal's IPN. I have an ipn.php file that is in the plugin directory, that file gathers the response from PayPal and verifies all the transaction details.
  That part works fine, but the second part of this is I must insert the variables into the WordPress database to mark a successful purchase. 
  Since $wpdb is not available in the ipn.php file, I must pass the data to the core of the plugin for processing.</p>
  
  <p>I am open to other solutions on this and your help is much appreciated. Thanks!</p>
  
  <p>Here is an example, this file will be used for a $.load() to fill an area in the admin panel</p>
  
  <pre><code>&lt;?php
      global $wpdb;
      $promos = $wpdb-&gt;get_results("SELECT * FROM ". $wpdb-&gt;prefix ."voltbam_promocodes");
  
      foreach($promos as $promo){
          ?&gt;
              ID: &lt;?php echo $promo-&gt;id ?&gt;&lt;br /&gt;
              Name: &lt;?php echo $promo-&gt;name ?&gt;&lt;br /&gt;
              Value: &lt;?php echo $promo-&gt;value ?&gt;&lt;br /&gt;
              Type: &lt;?php echo $promo-&gt;type ?&gt;&lt;br /&gt;&lt;br /&gt;
  
          &lt;?
      }
  
  ?&gt;
  </code></pre>
  
  <p>And here is the output</p>
  
  <pre><code>Fatal error: Call to a member function get_results() on a non-object in (filename) on     line 3
  </code></pre>