Thursday, April 8, 2010

Secure E-mail

For your information, the e-mail form can be secured from any kinds of e-mail injections by validating the user input. See the example below:


(click image to view)

(click image to view)

We actually use the PHP filter in the code above to validate user input:
  • The FILTER_SANITIZE_EMAIL filter removes all illegal e-mail characters from a string.
  • The FILTER_VALIDATE_EMAIL filter validates value as an e-mail address.

No comments:

Post a Comment