title: How to echo an ajax variable in PHP file
body: <p>I am trying to send a variable from one PHP file to another PHP file and echo it:</p>
  
  <pre class="lang-js prettyprint-override"><code>&lt;script&gt;
   $.ajax({
          type: "POST",
          url: 'AjaxCallTest.php',
          data: ({Imgname:"13"}),
          success: function() {
              alert('form was submitted');
          }
      });
  &lt;script&gt;
  </code></pre>
  
  <p>And then in the receiving PHP file (<code>AjaxCallTest.php</code>):</p>
  
  <pre class="lang-php prettyprint-override"><code>&lt;?php
      $temp = $_POST['Imgname'];
      echo $temp;
  ?&gt;
  </code></pre>
  
  <p>but AjaxCallTest file doesn't echo anything? I need to get this variable and echo it. Note that I've included jQuery library in my code but I didn't include it in <code>AjaxCallTest.php</code>.</p>