Difference between PHP Validating filters and PHP Sanitizing filters

Validating filters:

Are used to validate user input
Strict format rules (like URL or E-Mail validating)
Returns the expected type on success or FALSE on failure

Sanitizing filters:


Are used to allow or disallow specified characters in a string
No data format rules
Always return the string

1 comment: