title: Problem in calling a variable from server to client
body: <p>I want to learn ajax. 
  Basically I begin to understand it, but I have one problem </p>
  
  <p>here is my js code</p>
  
  <pre><code>$('#click').on('click',function () {
       var a="good";
       $.ajax({
         url:'/ggg.php',
         method:'post',
         data:{
             info:a
         },
         success:display_data
       })
  });
  </code></pre>
  
  <p>here is my html code</p>
  
  <pre><code>&lt;input type="submit" value="do it" id="click"&gt;
  </code></pre>
  
  <p>here is my php code</p>
  
  <pre><code>&lt;?php
     echo $_POST['info'];
  </code></pre>
  
  <p>that's what I see in console.log
  <a href="https://i.stack.imgur.com/bv3Jt.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/bv3Jt.png" alt="enter image description here"></a></p>
  
  <p>and the word "good" should appear</p>