I'm new to sanitizing input data, but we are starting to ramp up with number of clients very quickly, so we will need to have all user inputs sanitized, just in case, as it's a best practice.
If I've got a form that posts 12 fields, what's the best and least expensive way to sanitize it?
for simplicity's sake let's say I've got
$one = $_POST['one'];
$two = $_POST['two'];
$three = $_POST['three'];
$four = $_POST['four'];
$five = $_POST['five'];
EDIT: right here - This is getting inserted into a database under metadata. I then call to
Then I'm just calling
printf('The input for One is ' .$theNewVarForOne. '!');
But there IS a potential for malicious code in there. What's the best way to strip all iffy inputs?
EDIT:
I should have been more specific. I am basically creating some 'post' data that is stored in a database. A title, the date, the body, etc.