Can't send variable in http request to php <p>I have a problem with my http request. I send a http request to server(using firefox): the <strong>requestheader</strong></p> <pre><code>Host: localhost User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:40.0) Gecko/20100101 Firefox/40.0 Accept: text/html, */*; q=0.01 Accept-Language: vi-VN,vi;q=0.8,en-US;q=0.5,en;q=0.3 Accept-Encoding: gzip, deflate Content-Type: text/plain; charset=UTF-8 Pragma: no-cache Cache-Control: no-cache Referer: http://localhost/home1/ Content-Length: 15 Cookie: _ga=GA1.1.868084363.1437301524 Connection: keep-alive **request body**: `ip=192.168.1.13` **This is my code on server:** if(isset($_POST['ip'])){ $ip = $_POST["ip"]; echo getLightStatusById($ip).'&amp;'.getSuccess($ip)."eos"; }else{ echo 'error'; } </code></pre> <p>I received message:</p> <pre><code>error </code></pre> <p>if i don't have if condition, i received:</p> <pre><code>undefined index... </code></pre> <p>What am i wrong? Thank you!</p>