Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

PHP/Apache problems in DWMX?

Status
Not open for further replies.

THE4MAN

Technical User
Mar 17, 2002
73
0
0
US
OK, It's 4AM, I've been trying to figure out this problem for 8 hours on my own now with no luck.

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:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "<html xmlns="<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:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "<html xmlns="<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
 
u can sometime face problems when u have both a name and id field, try removing the id's for all the tags...

Known is handfull, Unknown is worldfull
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top