jimfog Posted December 7, 2012 Share Posted December 7, 2012 (edited) I want to validate the e-mail a user a has filled in a form(it will be also his username).+ But before that I want to sanitize it first and the question is what do I must take into consideration to do this. I have never done it before and I do not know what I must take into account in such a case. And something else. Is sanitization going to cover me on security issues too. I mean, does sanitization includes also the term input filtering? Edited December 7, 2012 by jimfog Link to comment Share on other sites More sharing options...
birbal Posted December 7, 2012 Share Posted December 7, 2012 (edited) Santinizing means removing the unwanted characters and pass the rest of the thing. where validate means wither it must be right or it will not be passed. Both comes into data filtering. when we need to filter something obvious where some little change can change the meaning of it, we use validating (like email) http://in1.php.net/filter there is some prebuilt filtersalso you can use preg_match() with some regular expressionIf you do it using regular expression always validate against whitelist of characters. info about regular expression http://regular-expression.info Filtering is crucial to any application. Edited December 7, 2012 by birbal Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now