I know I'm probably being really pedantic here, but in your code, jeremyphphaven, you're using short open tags. This is in fact an option that some people disable on their setups to prevent confusion with XML which also opens with <? . If you want to build a truly portable app you might want to remove the short open tags, so you code would be:
<?php
// LOGIC/CALCULATIONS
$numberA=5;
$numberB=616;
$output = calculate($numberA,$numberB);
if($output < 800)
header("Location:GoSomewhere.php");
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
</head>
<body>
<div align="center">
<h5>Math Answer: <?php echo $numberA; ?> x <?php echo $numberB; ?> = <?php echo $output; ?></h5>
</div>
</body>
</html>
<?php
// FUNCTIONS
function calculate($a,$b=1)
{
return $a*$b;
}
?>
If you like your code the way it is, then that's fine, but you might encounter the occasional problem with varying PHP setups.