title: Pass Jquery var to PHP and retrieve
body: <p>I am trying to pass a jquery variable to a PHP variable and then retrieve that variable so I can use it in a php function.  The jquery variable is a string and after I pass to PHP and retrieve and echo it, I get nothing.</p>
  
  <p>Here is my simplified code from test.php file.</p>
  
  <pre><code>&lt;?php
   $senderid = $_POST['senderid']; 
   echo $senderid; //I get nothing here.
  ?&gt;
  
  &lt;script&gt;
  $('a.send').on('click', function( event ) {
  event.preventDefault();
  var href = $(this).attr('href');
  var senderID = parseInt(href.split('sender_id=')[1]);
  
      $.ajax({
          url: 'test.php',
          type: 'POST',
          data: {senderid: senderid},
          success: function(){
            jQuery('.test').text('&lt;?php echo $senderid; ?&gt;'); ///nothing here
          }
      });
  });
  &lt;/script&gt;
  </code></pre>