Um Gottes Willen nicht!
bearbeitet von Raketenwilli> Mein aktueller Ansatz ist:
>
> ~~~
> if (!empty($_GET)) {
> $_GET = filter_var_array($_GET, FILTER_SANITIZE_FULL_SPECIAL_CHARS);
> extract($_GET, EXTR_OVERWRITE);
> }
> if (!empty($_POST)) {
> $_POST = filter_var_array($_POST, FILTER_SANITIZE_FULL_SPECIAL_CHARS);
> extract($_POST, EXTR_OVERWRITE);
> }
> ~~~
>
> Kann ich das so machen oder ist das nicht empfehlenswert?
[BEWARE! (Lese die Antworten!)](https://forum.selfhtml.org/self/2022/nov/05/frage-zu-sicherer-behandlung-von-user-input/1803464#m1803464)