处理来自移动设备的POST请求

I have a local wireless network, with my computer running WAMP Server, and my mobile Android phone running an app I made.

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 :

myvarDetect.php

<?php
  if( $_POST["myvar"])
  {
     echo "myvar ok";
  }
  else
      {
     echo "myvar error";
    }
?>

I always get an error, even when I refresh the page many times.

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.

I compared with wireshark the two requests, they are quite similar.

What did I do wrong ? How can I handle the received POST request, and make an appropriate response ?

Thanks