Does The Filter function use regex?
I don't know: probably, but it's a built-in function. It just makes sure it's reasonably valid syntax, but does not rigidly enforce the standards.
Could I use Trim in this statement if so were?
Sure. I often apply trim() to the $_POST array separately via array_walk_recursive() before doing anything else with it.
Only if you think you really need it, as users find it annoying.
How would I impliment a required section?
Not sure what you mean, but I think that's what the empty() check would be fore. If you want to enforce minimum or maximum numbers of characters, you can use strlen() to check the length, or substr() to just truncate any extra characters if that's desired.
Instead of having a if statement for every field in the form could I have it like this? My concept in my head is fine but I am having an issue to explain it.
$values = new array('[B]gets data from the $_POST[/B]'); // I am unsure how I would do this? I have used php for years but this has been one of my biggest confusions
$errors = "Incorrect "'.$values.'" ";
You could set up some sort of array defining field names, types, minimum/maximum lengths, and so forth, then loop through that array to run a generic validation function on each.