I'm trying to send an email using php. I've the following only it doesn't seem to output anything to my browser nor send my email, can anybody see what i'm doing wrong?
$to = "liam@mysite.co.uk";
$subject = "Alien Sighting";
$message = foreach ($_POST as $key=>$value) {
$$key = $value;
}
$from = "Sighting@site.co.uk";
$headers = "From:" . $from;
mail($to,$subject,$message,$headers);
echo "Mail Sent.";