I'm new to PHP and Apache so I'm not sure the problem is PHP, Apache or something else.
I have this input HTML:
- Code: Select all
<!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 content="text/html; charset=utf-8" http-equiv="Content-Type" />
<title>feedback</title>
</head>
<body>
<form action="handle_form.php" method="post" name="form1" id="form1" >
<p>Name:<select name="title">
<option value="Mr.">Mr.</option>
<option value="Mrs.">Mrs.</option>
<option value="Ms.">Ms.</option>
</select>
<input name="name" type="text" size="20" />
</p>
<p>E-mail:<input name="email" type="text" size="20" />
</p>
<p>Radio Response: This is...
<input name="response" type="radio" value="excellent"/>Excellent
<input name="response" type="radio" value="okay" />Okay
<input name="response" type="radio" value="lousy" />Lousy
</p>
<p>COMMENTS:<textarea name="comments" cols="20" rows="3"></textarea>
</p>
<input name="Submit1" type="submit" value="Send" />
</form>
</body>
</html>
At execution time, this code is called:
- Code: Select all
<!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 content="text/html; charset=utf-8" http-equiv="Content-Type" />
<title>handle_form</title>
</head>
<body>
<?php
$title = $_POST["title"];
$name = $_POST['name'] ;
$email = $_POST["email"];
$response = $_POST["response"];
$comments = $_POST["comments"];
print "<p>Thanks: $title $name </p>";
print "<p>Your response was $response and you added this comment:<br/> $comment </p.";
print "<p>Bye, $name.....</p>";
?>
</body>
</html>
This is what I get after the execution is the second HTML and not the contents that should have been processed by PHP.
Apache V2.3.4 (from Apache Lounge)
PHP Version :PHP Version 5.3.17 VC9
Windows 7.
Any ideas what I'm doing wrong?
Thank You for Your time
Husky



