i am having problem in uploading data to online mysql database. i am using scheduled tasks to run php script all the data is sent to the server through json_encode
and the data is received perfectly but when inserting into mysql database it only insert first alphabet of that data
this code gets the data
$da = $_GET['data'];
$d = json_decode($da, true);
by printing it shows complete data but only inserts the first alphabet of the data
$a = 0;
foreach($d as $data)
{
echo $v = "INSERT INTO clms_data(id,teacher_id,course_id,session,section,stDate,endDate,type,description,filename,allow) VALUES(".$data[$a][0].",'".$data[$a][1]."','".$data[$a][2]."','".$data[$a][3]."','".$data[$a][4]."','".$data[$a][5]."','".$data[$a][6]."','".$data[$a][7]."','".$data[$a][8]."','".$data[$a][9]."',".$data[$a]['allow'].")";
$qu = mysql_query($v) or die(mysql_error());
if($qu)
{
echo "Execute $a<br />";
}
else
{
echo "Error";
}
$a++;
}