Your problem is that you *are* sending output to the browser before calling header().
Any text outside of <?php and ?> tags is considered output text. In your case, you're sending your <HTML> and <BODY> tags (with a few newlines) before ever starting to process your PHP script.
Rewrite yours as:
Code:
<?php
// send headers
header("Cache-Control: no-cache, must-revalidate");
header("Pragma: no-cache");
header("Expires: Fri, 20 Jun 2003 12:38:00 GMT");
// begin HTML output
echo "<html>\n";
echo "<body>\n";
echo "The date today is: ";
echo gmdate("M d Y");
echo " The time is: ";
echo gmdate("h"), ":", gmdate("i"), ":" , gmdate("s"), " ", gmdate("a");
echo "</body>\n";
echo "</html>\n";
?>
Also note that all tag names should be lower case to conform to new standards.
Take care,
Nik
http://www.bigaction.org/