Re: Injection in mail()




moosus wrote:
G'day Guys,

Do I need to worry about cleaning my $_POST[comments] field before using it
in a mail() function?

Cheers
moosus

you mean incase someone inserts malicious code into your web forms??
yes you should use striptags(), look at http://www.php.net/striptags
there are example scripts there that do a pretty good job of cleaning
anything slightly malicious - striptags on its own isnt 100% surefire.

Flamer.

.