I have a problem with my http request. I send a http request to server(using firefox): the requestheader
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).'&'.getSuccess($ip)."eos";
}else{
echo 'error';
}
I received message:
error
if i don't have if condition, i received:
undefined index...
What am i wrong? Thank you!