title: Still failing to figure out what I'm doing wrong about making a PHP function handle an AJAX request in WordPress
body: <p>After literally hours of trying to hook up a function to handler AJAX requests through WordPress's API, I am still coming short. I've gone back to basic by trying a basic test</p>
  
  <pre><code>&lt;?php
      add_action( 'wp_ajax_member_update', 'member_update' );
  
      function member_update ( )
      {
          echo $_POST['testvariable'];
      }
  ?&gt;
  
  &lt;script type="text/javascript"&gt;
      jQuery(document).ready(function($) {
  
          var data = {
              'action': 'member_update',
              'testvariable': 1234
          };
  
          $.post(ajaxurl, data, function(response) {
              alert('Got this from the server: ' + response); // expected: 1234
          });
      });
  &lt;/script&gt;
  </code></pre>
  
  <p>and even this is returning Status Code 200 and Response 0. What am I missing? I'm perfectly following <a href="https://codex.wordpress.org/AJAX_in_Plugins" rel="nofollow">the documentation</a> as far as I can tell.</p>