title: How can you escape quotes in form post submit?
body: <p>For my form submission, whenever there is a single quote or double quote, all the text after the quote gets cut off in the $_POST['p#'] that is being sent. I have tried htmlspecialchars, string replacing with $#039, and addslashes but the string in the $_POST array still gets cut off. Here is the relevant part of the code and when $ques has a string with a single quote in it, there are problems.</p>
  
  <pre><code>        "&lt;form action="some.php" method="post"&gt;&lt;input type='checkbox' name='p".$numberOfProgrammingQuestion."' value='".$ques."'&gt;".$ques."&lt;br&gt;&lt;br&gt;";
  </code></pre>