title: Handle a POST request coming from a mobile device
body: <p>I have a local wireless network, with my computer running WAMP Server, and my mobile Android phone running an app I made.</p>
  
  <p>In this app, I send to a page on my server a variable using POST method. I just can't figure out how to catch it. The script I use looks like this :</p>
  
  <p>myvarDetect.php</p>
  
  <pre><code>&lt;?php
    if( $_POST["myvar"])
    {
       echo "myvar ok";
    }
    else
        {
       echo "myvar error";
      }
  ?&gt;
  </code></pre>
  
  <p>I always get an error, even when I refresh the page many times.</p>
  
  <p>If I do the same, using this time a jQuery script located on another page that sends to myvarDetect.php a variable with the POST method (using AJAX), everything is ok.</p>
  
  <p>I compared with wireshark the two requests, they are quite similar. </p>
  
  <p>What did I do wrong ? How can I handle the received POST request, and make an appropriate response ?</p>
  
  <p>Thanks</p>