Dear Fellow Members, Greetings!
I am very new to PHP. I have a problem in "report.php" page generated by the Chapter 1 exercise (It's Alive - add life to your static pages).
The page not shows "Was Fang there?" line with the radio selection as expected in browser (latest Chrome), but it shows correctly in the email (please find the snaps attached):
Following is the code of my report.php:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
<html lang="en" xml:lang="en" xmlns="http://www.w3.org/1999/xhtml">
<title>Aliens Abducted Me - Report an 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'];
$email = $_POST['email'];
$other = $_POST['other'];
$to = 'email@example.com';
$subject = 'Aliens Abducted Me - Report an Abduction';
$msg = "$name was abducted $when_it_happened and was gone for $how_long. \n" .
"Number of aliens: $how_many\n" .
"Alien Description: $alien_description\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.<br /><br />';
echo 'You were abducted '.$when_it_happened.' 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 'Your email address is ' .$email.'.';
Kindly advice on what went wrong and how to rectify this error.
I have hosting account with GoDaddy.com and using PHP ver 5.5.
Thanks in advance.