Strange things are happening.
Posted: Wed Jun 30, 2004 9:09 am
I'm just starting out with php, and following a tutorial. After LOTS of heart ache i have decided PHP is not behaving the way it should:
On a page of HTML that has three snippets of PHP, the HTML code between the second and third PHP blocks is not visible in the browser.
This page appears as:
Any ideas?
Greatly appreciated,
Adrian
On a page of HTML that has three snippets of PHP, the HTML code between the second and third PHP blocks is not visible in the browser.
Code: Select all
<html>
<body>
<?php
if (submit) {
// process form
while (list($name, $value) = each($HTTP_POST_VARS)) {
echo "$name = $value<br>\n";
}
} else{
// display form
?>
<form method="post" action="<?php echo $PHP_SELF?>">
First name:<input type="Text" name="first"><br>
Last name:<input type="Text" name="last"><br>
Address:<input type="Text" name="address"><br>
Position:<input type="Text" name="position">
y <br>
<input type="Submit" name="submit" value="Enter information">
</form>
<?php
} // end if
?>
</body>
</html>Code: Select all
<html>
<body>
</body>
</html>Greatly appreciated,
Adrian