Help!
I'm using Dreamweaver MX to create a couple of PHP test pages. Just wanting to input a name and have it say thank you, "name" on a second page. Really easy stuff, I know, but here's what happens...
I get the first page (test_form.php) authored correctly with the following code:
Then I create the second page (test_form_processor.php) with the following code:
When I run the first page, I get the prompt to enter the name. I do and click the button. The second page that is displayed omits the name I entered on the first page(displaying nothing in it's place). The source code for the 2nd page, instead of displaying the name in HTML, shows the actual PHP code: <?php echo $_POST['firstName']; ?>
Here's the other important stuff. I successfully installed Apache 2.0.50 and PHP 4.3.8. I get the Apache screen at and I get the PHP info screen when I execute a phpinfo file in the localhost folder. So both would appear to be running correctly. This is on a Win2000 Pro machine with SP4 installed.
What's going on here? Is Apache not processing PHP correctly? Or is PHP not configured correctly to work with Apache? Or something else altogether?
Thanks in advance for any help you can provide.
Dave Fore
I'm using Dreamweaver MX to create a couple of PHP test pages. Just wanting to input a name and have it say thank you, "name" on a second page. Really easy stuff, I know, but here's what happens...
I get the first page (test_form.php) authored correctly with the following code:
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "[URL unfurl="true"]http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">[/URL]
<html xmlns="[URL unfurl="true"]http://www.w3.org/1999/xhtml">[/URL]
<head>
<title>Test Form</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
</head>
<body>
<form name="frm_name" id="frm_name" method="post" action="test_form_processor.php">
First Name
<input name="firstName" type="text" id="firstName" />
<input type="submit" name="Submit" value="Submit" />
</form>
</body>
</html>
Then I create the second page (test_form_processor.php) with the following code:
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "[URL unfurl="true"]http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">[/URL]
<html xmlns="[URL unfurl="true"]http://www.w3.org/1999/xhtml">[/URL]
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
</head>
<body>
<p>Thank you, <?php echo $_POST['firstName']; ?>, for filling out my form. </p>
</body>
</html>
When I run the first page, I get the prompt to enter the name. I do and click the button. The second page that is displayed omits the name I entered on the first page(displaying nothing in it's place). The source code for the 2nd page, instead of displaying the name in HTML, shows the actual PHP code: <?php echo $_POST['firstName']; ?>
Here's the other important stuff. I successfully installed Apache 2.0.50 and PHP 4.3.8. I get the Apache screen at and I get the PHP info screen when I execute a phpinfo file in the localhost folder. So both would appear to be running correctly. This is on a Win2000 Pro machine with SP4 installed.
What's going on here? Is Apache not processing PHP correctly? Or is PHP not configured correctly to work with Apache? Or something else altogether?
Thanks in advance for any help you can provide.
Dave Fore