There are a lot of 'secure PHP form' questions out there, but I wasn't able to find a simple definitive 'bare-minimum needed' answer.
How would I go about making a form 100% safe? Is it as simple as running a function on the output like so:
$text = $_POST['text'];
$text = doThisToMakeSafe($text);
or are there other ways someone can get malicious access via a form without submitting?
Ideally, I'd like a snippet of code I can throw into all forms so that I never have to worry about any security issues. Is this possible?