this is my php page .I am sending data to $_post["name"],$_post["myHttpData"],$_post["address"]by an android application .I have tried writing these value in text file to check successful reception of data .The data is being received but a blank row (all fields blank) is being inserted when I send data .
<?php
$con=mysqli_connect("fdb2.biz.nf","1463950_rtr","tcp123","1463950_rtr");
// Check connection
if (mysqli_connect_errno())
{
echo "Failed to connect to MySQL: " . mysqli_connect_error();
}
$data=$_post["myHttpData"];
$data1=$_post["name"];
$data2=$_post["address"];
$sql="INSERT INTO SMS (sender,body,time)
VALUES
('$data','$data1','$data2')";
if (!mysqli_query($con,$sql))
{
die('Error: ' . mysqli_error($con));
}
echo "1 record added";
mysqli_close($con);
?>
I have also tried using
$sql="INSERT INTO SMS (`sender`,`body`,`time`)
VALUES
('$data','$data1','$data2')";
But it also produces same results .