Hello community,any little help will be welcome.
File : "post.php"
<?
$data = "pippo";
$ch = curl_init();
curl_setopt ($ch,CURLOPT_URL, "http://www.mysite/get.php");
curl_setopt ($ch, CURLOPT_VERBOSE, 1);
curl_setopt ($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: text/xml'));
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
$result = curl_exec($ch);
curl_close ($ch);
?>
File "get.php"
<?
$sqlquery = "insert into my_table
values ('".$id."','".$data."')";
$store_data = mysql_query($sqlquery);
?>
This file works,it receives data,but $data is not stored and only $id is incremented.
Any idea?