title: Use of double quotes in a 'input type="text"' value wont work, string stops at double-quote !
body: <p>How can I make it possible for users to use the '"' (double quote) inside a textfield...</p>
  
  <p>Whenever I do use double-quote in the field (the value) then when receiving the variable in my PHP file with:</p>
  
  <pre><code>   $text=mysql_real_escape_string($_POST['subject']);
  </code></pre>
  
  <p>and then echo it, I get a string which is escaped properly, but the string stops exactly before the double-quote!</p>
  
  <p>I dont want it to stop because of the double-quote though!</p>
  
  <p>Javascript is used to validate the text-field so its not empty, maybe I should do something more with javascript when validating, and altering the value, so php can get the correct value including the double quotes?</p>
  
  <p>Thanks</p>
  
  <p><strong>UPDATE</strong></p>
  
  <p>CODE:</p>
  
  <pre><code>   $headline= mysql_real_escape_string($_POST['headline']);
     echo htmlentities($headline);
  </code></pre>
  
  <p>I have tried merging the two above, will only give the same results.
  NOTE: I have ALSO TRIED adding <code>ENT_QUOTES</code> into the htmlentities function...</p>
  
  <p>Unformatted string as entered:</p>
  
  <pre><code>   + , . ; : - _ space &amp; % ! ? = # * ½ @ / \ [ ]&lt; &gt; " ' hej hej
  </code></pre>
  
  <p>will output this when echoing it:</p>
  
  <pre><code>   + , . ; : - _ space &amp; % ! ? = # * Â½ @ / \\ [ ]&lt; &gt; 
  </code></pre>