PHP Include Not Working
Posted by: JustinW
Posted on: 2008-03-14 10:56:00
I'm just learning php and trying to set up a php form. I've got my form working on a .php file but I want to have an html file use an include to pull the form from the .php file. For some reason I can't get my include to do anything. (It's probably a glaringly obvious mistake.)
When I load the below html page it does not include the form from the include, just the header text, everything else is blank.
visit the page to see what I mean - www.sacloaves.org/phptest/DHform.html
and check out the php here -
www.sacloaves.org/phptest/DHform.php
Any Help please?
Here's my code (it's very short):
The HTML page:
<html>
<body>
<?php include 'DHform.php'; ?>
<h1>Testform.html</h1>
</body>
</html>
The DHform.php Code:
<form action="DHecho.php" method="post">
Name: <input type="text" name="name"/>
<input type="submit"/>
</form>