i am sending data from iphone to server using php it is sending data from iphone but not inserting in mysql i am using following php code.
<?php
$con =
mysql_connect("surveyipad.db.6420177.hostedresource.com","tom","ben");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db("surveyipad", $con);
$device_Id=$_POST['device_Id'];
$R1=$_POST['R1'];
$R2=$_POST['R2'];
$R3=$_POST['R3'];
$comment=$_POST['comment'];
$update_date_time=$_POST['update_date_time'];
$query=("INSERT INTO survey_responsese_pfizer (device_Id,R1,R2,R3,comment,update_date_time)
VALUES ('$device_Id','$R1','$R2','$R3','$comment','$update_date_time')");
mysql_query($query,$con);
printf("Records inserted: %d\n", mysql_affected_rows());
echo($device_Id)
?>
Ok one only learns by example, stop using the mysql_functions(), They are no longer maintained and are officially deprecated. And in PHP 5.6 they will most likely be removed, rendering you code broken.
Move over to PDO with prepared querys.
A Port of your current code using PDO:
Untested tho, hope it helps.