title: How do i post a long string into a PHP page?
body: <p>This question has two parts:</p>
  
  <p><strong>Part I - restriction?</strong></p>
  
  <p>I'm able to store data to my DB with this:</p>
  
  <pre><code>www.mysite.com/myscript.php?testdata=abc123
  </code></pre>
  
  <p>This works for a short string (eg 'abc123') and the page echos what was written to the DB; however, if the [testdata=] string is longer than 512 chars and i check the database, it shows a row has been added but it's blank and also my echo statement in the script doesn't display the input string.</p>
  
  <p>N.B. I'm on a shared server and have emailed my host to see if it's a restriction.</p>
  
  <p><strong>Part II - best practice?</strong></p>
  
  <p>If i can get past the above hurdle, I want to use a string that's <strong>~15k chars long</strong> created in a desktop app that concatenates the [testdata=] string from various parameters; what's the best way to send a long string in PHP POST? </p>
  
  <p>Thanks in advance for your help, i'm not too savvy with PHP.</p>
  
  <p>Edit: Table config:
  <img src="https://i.stack.imgur.com/tqLrr.png" alt="enter image description here"></p>
  
  <p>Edit2: Row anomaly with long string > 512 chars:
  <img src="https://i.stack.imgur.com/q25IF.png" alt="enter image description here"></p>
  
  <p>Edit3: here's my PHP script, if it helps:</p>
  
  <pre><code>&lt;?
  include("connect.php");
  
  $data = $_GET['testdata'];
  $result = mysql_query("INSERT INTO test (testdata) VALUES ('$data')");
  
  if ($result) // Check result
  {
      echo $data;                 
  }
  else echo "Error ".$mysqli-&gt;error;
  
  mysql_close(); ?&gt;
  </code></pre>