After searching over the internet how to secure a web application(forms) in PHP,
in most of the cases were just suggestions not a short and real example.
In some cases is suggested to use strip_tags( trim( $_POST['PARAMETER'] ) );
but when you have some special inputs like comments field
htmlentities ( trim ( $_POST[ ‘comment’ ] ) , ENT_NOQUOTES ); is suggest.
Maybe there is a useful example (custom made function) to achieve standard safe methods without introducing complicated libraries like HTMLPurifier into the application.
Thank you for your time!