PHP - Input hidden fields with variables that contain quotes
<p>I try to make a editor for a job offer. It must have a preview function. There are 2 form. First form submits the preview, the second one appears when the preview is there and sends the variables to save them in the database. The problem is, that when the second form get submitted, all quotes disappear. I tryed mysql_real_escape_string, htmlspecialchars, htmlentitles, but nothing works. Do you got an idea where the problem is?
Could it be that there's a problem, because I use the variable '$content' to store the site's content, instead to make a direct output with 'echo'?
Thanks!</p>

<pre><code>&lt;td&gt;&lt;input style='float:left;' type='submit' name='jobpreview' value='preview' /&gt;
&lt;/form&gt;";
if(isset($_GET['preview']))
{ 
$_POST['titel'] = htmlentities($_POST['titel']);
$_POST['elm1'] = htmlentities($_POST['elm1']);
  $content .= " &lt;td&gt;&lt;form action='?s=intern&amp;sub=neuerjob&amp;preview' method='POST'&gt;
  &lt;input type='hidden' name='titel' value='".$_POST['titel']."' /&gt;
  &lt;input type='hidden' name='elm1' value='".$_POST['elm1']."' /&gt;
  &lt;input style='float:left;' type='submit' name='jobsave' value='save' /&gt;
  &lt;/form&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;";
}
</code></pre>
