PHP submits a request to automatically filter out the specified characters in the input box. how can this problem be solved? When submitting data, filter out the & lt; img & nbsp; src = & nbsp; and & nbsp; & gt; & nbsp; characters in all input data and keep other content. How can this be written? PHP submits and automatically filters out the specified characters in the input box. how can this problem be written?
When data is submitted, all characters in input are filtered out and other content is retained.
How can I write this? PHP shares the following:
------ Solution --------------------
$ S = str_replace ('>', '', str_replace ('echo $ s;
------ Solution --------------------
$ Src ='
------ Solution --------------------
------ Solution --------------------
IUs ';
$ Post = $ _ POST ['value'];
Preg_match ($ src, $ post, $ v );
Print_r ($ v );
?>
------ Solution --------------------
If you process the submitted data instead of the received data, you must use regular expressions,
Var s = document. getElementById ('input _ id ');
S = s. replace (/(------ solution --------------------
> +/Ig ,"");
I did case-insensitive and multi-line processing. check if you want it.
------ Solution --------------------
Preg_match ('/"(.*)?. [A-Z] {3, 4} "/I ', $ input_value, $ arr );
Echo $ arr [0];