I have a big form that when submit execute some preg_replace converting html tags into clear text to be inserted into my db…
but I’m still get some errors, and I’m sure I can’t except all errors in advance, so I want execute the real_escape_string…
so I have
$text = $_POST(‘text’) after several preg_replace;
$query = "INSERT INTO table (field1,field2,field3) VALUES ".$text;
$sql = Conn()->prepare($query);
$prueba = $sql->real_escape_string();
$insert = $prueba->execute();I get Call to undefined method Doctrine\DBAL\Statement::real_escape_string()
Also …
Any input field on phpmaker already made strip_stags or something true?
Becuase my script convert
nnn into
Insert into table (id,name) values (Yyy,nnn)
But if i use a normal phpmaker field i got
Insert into table (id,name) values (nnn).
So the preg_replace that take value= as id it didn't worked...