title: Data send to web server from localhost using php
body: <p>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 <code>json_encode</code> and the data is received perfectly but when inserting into mysql database it only insert first alphabet of that data</p>
  
  <p>this code gets the data</p>
  
  <pre><code>$da = $_GET['data'];
  $d = json_decode($da, true);
  </code></pre>
  
  <p>by printing it shows complete data but only inserts the first alphabet of the data</p>
  
  <pre><code>$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&lt;br /&gt;";
          }
          else
          {
              echo "Error";
              }
      $a++;
          }
  </code></pre>