title: Send ' symbol through mysql
body: <p>I have got a php code</p>
  
  <pre><code>$Txt=$_POST['chat_txt'];
  $Txt=trim($Txt);
  $Txt=htmlspecialchars($Txt);
  $Txt=preg_replace("/(^[\r\n]*|[\r\n]+)[\s\t]*[\r\n]+/", "\n", $Txt);
  $ins=$con-&gt;query("INSERT INTO chat (Message,From_) VALUES('$Txt','$NameId')");
  </code></pre>
  
  <p>And if <code>$Txt</code> is <code>We're</code> then it is going to return  an error about right to use syntax.What do i have to do to prevent that?</p>