title: TextArea not saving to mySQL if over 512 Bytes
body: <p>I've been searching for ages and can't find this precise problem, but feel free to point me in the right direction if it has.</p>
  
  <p>Simple Description: have a page that has a TEXTAREA on it. This TEXTAREA is to accept HTML as it's used to edit the home page of a client's website.</p>
  
  <p>The aim is for this TEXTAREA to save to a VERY simple mySQL table.</p>
  
  <p>PROBLEM: The problem is that if the TEXTAREA exceeds 512 characters is saves <strong>nothing</strong> to the database field. Under that it stores it fine.</p>
  
  <p>Here's the code:</p>
  
  <pre><code>$homeTopLeft = addslashes(htmlentities($_GET['homeTopLeft'], ENT_QUOTES | ENT_IGNORE, "UTF-8"));
  $homeNews    = addslashes(htmlentities($_GET['homeNews'], ENT_QUOTES | ENT_IGNORE, "UTF-8"));
  
  mysql_login();
  
  $query = "UPDATE cmsData SET homeTopLeft='$homeTopLeft', homeNews='$homeNews', lastUpdated=NOW() WHERE entry=1";
  $result = mysql_query($query) or die(reportError('Unable to save new CMS data'));
  if (mysql_affected_rows() &gt; 0) {
      echo '&lt;p class="ok"&gt;Pages Successfully Updated!&lt;/p&gt;';
      echo '&lt;p style="border:1px dashed #ccc;"&gt;homeTopLeft = ' . $homeTopLeft . '&lt;/p&gt;';
  } else {
      echo '&lt;p class="err"&gt;Unable to update the home page&lt;/p&gt;';
  }
  </code></pre>
  
  <p>I currently have the $_GET method as I'm actually calling the function via AJAX, which works fine under 512 characters.</p>
  
  <p><strong>What It's Not</strong>
  - It's not the mySQL field size: Its data type is TEXT and I've manually increased the field through phpMyAdmin without error.
  - It's not (as far as I can tell) the AJAX call, because it works if the TEXTAREA is &lt; 512 Bytes
  - The Collation (I don't think: I have it set to <code>latin1_general_ci</code> and have tried <code>latin1_bin</code> and some of the UFT ones)</p>
  
  <p><strong>Final Note</strong>
  The actual database size of the field <code>homeTopLeft</code> has to be greater than 512 Bytes because of the <code>htmlentities</code> call.</p>
  
  <p>I should also add that this occurs whether I'm just using a plain <code>TEXTAREA</code> or a <code>tinyMCE</code> rich text editor.</p>
  
  <p>Any help you could offer would be gratefully received. Thanks!</p>