I've been working on building the feedback form as detailed in chapter 3. However, upon submitting the feedback form, the user's name does not appear. For example, in the handle_form.php, it comes up:
"Thank you, Ms. , for your comments.
You stated that you found this example to be 'excellent' and added:
Great job!"
The person's name is missing. I have copied my code below. Can you let me know if I'm overlooking something and why it doesn't include the person's name?
--------Here is the HTML----------------
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang"en"
<head>
<meta http-equiv="content-type" content'"text/html; charset=utf-8" />
<title>Feedback Form</title>
</head>
<body>
<!--Script 3.1 - feedback.html-->
<div><p>Please Complete this form to submit your feedback:</p>
<form action="handle_form.php" method="post">
<p>Name: <select name="title">
<option value="Mr.">Mr.</option>
<option value="Mrs.">Mrs.</option>
<option value="Ms.">Ms.</option>
</select> <input type="text" name="email" size="20" /></p>
<p>Response: This is...
<input type="radio" name="response" value="excellent" />excellent
<input type="radio" name="response" value="okay" />okay
<input type="radio" name="response" value="boring" />boring
<p>Comments: <textarea name="comments" rows="3" cols="30"></textarea></p>
<input type="submit" name="submit" value="Send my feedback" />
</form>
</div>
</body>
</html>
----------------------Here is the PHP----------------------------
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang"en"
<head>
<meta http-equiv="content-type" content'"text/html; charset=utf-8" />
<title>Your Feedback</title>
</head>
<body>
<?php
$title = $_POST['title'];
$name = $_POST['name'];
$response = $_POST['response'];
$comments = $_POST['comments']
print"<p>Thank you, $title; $name, for your comments.</p>
<p>You stated that you found this example to be '$response' and added: <br />$comments</p>";
?>
</body>
</html>