I've found myself working on another developer's code. By his own admission he's just a beginner so I want to give solid advice.
I came across this:
<?php
$headerFields = array(
"From: ".$_POST[...],
"MIME-Version: 1.0",
"Content-Type: text/html;charset=utf-8"
);
mail("submissions@[...].com","Submission to [...] from " . $_POST[...] . "","New submission to [...]
Name*: " . $_POST[...] . " [...big-snip...]",
implode("\r\n", $headerFields)
);
(edited heavily, obviously)
I tend to not use mail() very often but my instinct is to sanitise everything with extreme prejudice. Is there any specific danger is leaving this as is or could someone of sufficient skill do some damage?