title: Limiting characters in textarea - escaped quotes and double quotes take up 2 characters in MySQL
body: <p>I want to limit a textarea to a certain number of characters and have written a JavaScript function to notify the user of the remaining number of characters. This limit matches the limit set in MySQL for that particular field.</p>
  
  <p>However, when saving the contents using PHP and mysql_real_escape_string(), it saves quotes and double quotes (and I'd imagine backslashes and all other escaped stuff) with a backslash so that those characters actually take up 2 spaces, thus rendering the JS function inaccurate. Any thoughts on how to get around this?</p>
  
  <p>EDIT: Per deceze's advice I checked if magic quotes were on and they are using a check with get_magic_quotes_gpc().</p>
  
  <p>But I have also checked the directory's .htaccess file and found this flag:</p>
  
  <pre><code>php_value magic_quotes_gpc                0
  </code></pre>
  
  <p>Which is apparently not turning off magic quotes. Any idea why?</p>