title: AJAX Passing Variable to PHP
body: <p>Wits end on this one.  I'm trying to use AJAX to pass a variable (table) over to PHP ($Table) to control a parameter of a SQL Query, but PHP outputs the variable ($Table) as null.</p>
  <p>What am I doing wrong here?</p>
  <pre><code>&lt;?php $Table = $_POST[table];?&gt;
  
  &lt;p class=&quot;tab&quot;&gt;The number of records in the &lt;?php echo $Table?&gt; table is: 
     &lt;?PHP
       $sql=&quot;SELECT * FROM $Table&quot;;
       $result=mysqli_query($connect,$sql);
       $records=mysqli_num_rows($result);
       echo($records);
     ?&gt;
  &lt;/p&gt;
  
  &lt;script&gt;
    $(document).ready(function(){
      var table = &quot;Members&quot;;
  
      $.ajax({
      method:&quot;POST&quot;,
      data:{table:table},
      });
      });
  
    &lt;/script&gt;
  </code></pre>