Reputation: 2149
My PHP scripts recieves information (from a user submitted form) and sends it (almost) straight away as an email. What kind of sainitization should I do on the data?
I want to know exactly which PHP function to use to sanitize the data.
Upvotes: 3
Views: 547
Reputation: 19573
You need to read up on email injection. Take a look here:
http://www.damonkohler.com/2008/12/email-injection.html
Upvotes: 2
Reputation: 154573
You'll want to:
Upvotes: 1
Reputation: 2292
Have a look at PHP Data Filtering. There are a lots of built in php functions which can be used for data validation and sanitization.
Upvotes: 1