I have run into a problem that I cannot figure out and I'm sure its a simple one but being new to this I was hoping someone could lend me some direct. I am retrieving information from a html page and taking that information and feeding it back to the user via PHP. I'm using PHP 5. here is the html code.
<form action="handl_form.php" method="post">
Mr. <input type="radio" name="title" value="Mr." />
Mrs. <input type="radio" name="title" value="Mrs." />
Ms. <input type="radio" name="title" value="Ms." />
<br />
Name: <input type="text" name="name" size="20" />
<br />
Email Address: <input type="text" name="email" size="20" />
<br />
Response: <select name="response">
<option value="Excellent">This is excellent</option>
<option value="Ok">This is Ok</option>
<option value="Boring">This is boring</option>
</select>
<br />
Comments: <textarea name="comments" rows="3" cols="30"></textarea>
<br />
<input type="submit" name="submit" value="Send my feedback" />
</form>
and here is my PHP page.
<?php
$title = $_POST['title'];
$name = $_POST['name'];
$response = $_POST['response'];
$comments = $_POST['comments'];
print "Thank you $title $name for your comments. <br />";
print "You stated that you found this example to be $response and added: $comments";
?>
if i run the php page and asign a value to the $name variable it will display the information. if i run it from the html page it displays the php page as html output. not sure what i did wrong. here is the output that happens when i select the submit button.
<!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">
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
<title>Untitled 1</title>
</head>
<body>
<?php
$title = $POST['title'];
$name = $POST['name'];
$response = $POST['response'];
$comments = $POST['comments'];
print "Thank you $title $name for your comments. <br />";
print "You stated that you found this example to be $response and added: $comments";
?>
</body>
</html>