making form processing script more secure
<p>what are some steps I can use to make this more secure?</p>

<pre><code>&lt;?php
foreach ($_POST as $field=&gt;$value)
{
$formcontent .= "$field: $value\n";
}
$formcontent .= 'User-Agent: '.$_SERVER['HTTP_USER_AGENT'];


$recipient = "****.***y@***********.co.uk";
$subject = "Event feedback form";
$mailheader = "From: web.form@**********.co.uk\r\n";
$mailheader .= "Reply-To: $email\r\n";
$mailheader .= "MIME-Version: 1.0\r\n";


mail($recipient, $subject, $formcontent, $mailheader) or die("Failure!");
header("location:http://www.**********.co.uk");
?&gt;
</code></pre>
