<html>
<head>
<title>Aliens Abducted Me - Report an Abduction</title>
<link rel="stylesheet" type="text/css" href="style.css" />
</head>
<body>
<h2>Aliens Abducted Me - Report an Abduction</h2>
<?php
// script varaibles
$first_name = $_POST['firstname'];
$last_name = $_POST['lastname'];
$email = $_POST['email'];
$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 variables
$to = 'leedswebsolutions@googlemail.com';
$subject = 'Aliens Abducted Me - Abduction Report';
//email message string variable
$msg = "$first_name $last_name was abducted on $when_it_happened and was gone for $how_long\n" .
"Number of aliens: $how_many\n" .
"Describe them: $alien_description\n" .
"What they did: $what_they_did\n" .
"Was Fang there? $fang_spotted\n" .
"Other comments: $other\n";
//HTML response
echo 'Thanks for submitting the form.<br />';
echo $first_name . ' ' . $last_name .', you were abducted ' . $when_it_happened . ' and gone for ' . $how_long . '.<br />';
echo 'Number of aliens: ' . $how_many . '.<br />';
echo 'Describe them: ' . $alien_description . '.<br />';
echo 'What they did: ' . $what_they_did . '.<br />';
echo 'Was Fang there? ' . $fang_spotted . '.<br />';
echo 'Other comments: ' . $other . '.<br />';
echo 'Your email address is ' . $email;
//send email
mail($to, $subject, $msg, 'From:' . $email);
?>
</body>
</html>