Chaim
Chaim

Reputation: 2149

PHP data sanitization in emails

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

Answers (3)

datasage
datasage

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

Alix Axel
Alix Axel

Reputation: 154573

You'll want to:

Upvotes: 1

bitfox
bitfox

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

Related Questions