Possible Duplicate:
PHP error: Cannot modify header information – headers already sent
Headers already sent by PHP
This is my code:
<html>
<body>
<?php
if($country_code == 'US')
{
header('Location: http://www.test.com');
}
else
{
header('Location: http://www.test.com/');
}
?>
<script language="JavaScript" type="text/javascript"></script>
</body>
</html>
No space before <?php
or after ?>
I have tried placing the HTML code and Javascript below the PHP altogether but then that would make it not track clicks to the page.