Q: How can I solve the problem? PHPcode $ conn-& gt; prepare (& quot; INSERTINTOabc (one, two, three) VALUES (: one,: two,: three) & quot ;); ask if each value of VALUES (: one,: two,: three) is trim ()? (Just pay attention to the problem of saving a dish?
PHP code
$ Conn-> prepare ("insert into abc (one, two, three) VALUES (: one,: two,: three )");
Ask if each value of VALUES (: one,: two,: three) is trim ()? (Only focus on clearing when storing data, and do not want to use the previous js clearing method)
------ Solution --------------------
Is the space part to be cleared? You can replace it with a regular expression.
------ Solution --------------------
$ Conn-> prepare ("insert into abc (one, two, three) VALUES (trim (: one), trim (: two), trim (: three ))");
Can this happen?
------ Solution --------------------
Otherwise, when the parameter is accepted
Trim and escape operations