title: Confuse about jquery post
body: <p>I am required to pass a parametre to jquery post and then get it using $_POST method .But it doesnt work this way</p>
  
  <pre><code>&lt;/head&gt;
  &lt;body&gt;
  
  &lt;?php
      $name = isset($_POST["name"]) ? "ok" : "error";
      echo $name;
  ?&gt;
  &lt;button type="button" id="getIt"&gt;Tıkla&lt;/button&gt;
  
  &lt;/body&gt;
  &lt;/html&gt;
  &lt;script&gt;
      $(document).ready(function(){
          $('#getIt').click(function () {
              $.post( "xx.php", {"name": "xxx"})
              });
         })
  &lt;/script&gt;
  </code></pre>