I've uploaded my form to my website, I fill out the form, I get the complete echo of the form and everything looks great but the email never arrives?
I have checked the email address, the spam / junk folders everything. Even changed the email address to send to but still no joy...?
Anyone got any ideas?
Here's my code...
<title>Aliens Abducted Me - Report and Abduction</title>
<h2>Aliens Abducted Me - Report an Abduction</h2>
$name = $_POST['firstname']. ' ' .$_POST['lastname'];
$when_it_happened = $_POST['whenithappened'];
$how_long = $_POST['howlong'];
$how_many = $_POST['howmany'];
$alien_description = $_POST['aliendescription'];
$what_they_did = $_POST['whattheydid'];
$fang_spotted = $_POST['fangspotted'];
$other = $_POST['other'];
$email = $_POST['email'];
$to = 'email@example.com';
$subject = 'Aliens Abducted Me - Abduction Report';
$msg = "$name was obducted $when_it_happened and was gone for $how_long.\n" .
"Number of aliens: $how_many\n" .
"What they did: $what_they_did\n" .
"Fang spotted? $fang_spotted\n" .
"Other comments: $other";
mail($to, $subject, $msg, 'From:' . $email);
echo 'Thanks for submitting the form ' . $name . '<br />';
echo 'You were abducted ' . $when_it_happened;
echo ' and were gone for ' . $how_long . '<br />';
echo 'Number of aliens ' . $how_many . '<br />';
echo 'Describe them: ' . $alien_description . '<br />';
echo 'The aliens did this:' . $what_they_did . '<br />';
echo 'Was Fang there? ' . $fang_spotted . '<br />';
echo 'Other comments: ' . $other . '<br />';
echo 'Is this your email address? ' . $email . '<br />';
Thanks for your help!