I have got a php 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->query("INSERT INTO chat (Message,From_) VALUES('$Txt','$NameId')");
And if $Txt
is We're
then it is going to return an error about right to use syntax.What do i have to do to prevent that?