So, I am working on this site and for some reason I can not figure this out. I keep getting the error
Warning: Cannot modify header information - headers already sent by (output started at /home/site/public_html/header.php:42) in /home/site/public_html/index.php on line 68
I have checked everything and maybe I need new pair of eyes
Here is the header
<?php
session_start();
include "config.php";
include 'functions.php';
$session_username = $_SESSION['username'];
$session_uid = $_SESSION['uid'];
$view = mysql_query("SELECT * FROM num");
$views = mysql_num_rows($view);
$views = $views;
$time = date("H:i:s");
$date = date("Y-m-d");
$PHP_SELF = $_SERVER['PHP_SELF'];
$browser = $_SERVER['HTTP_USER_AGENT'];
$firefox = strpos($browser, 'Firefox') ? true : false; // All Firefox
$chrome = strpos($browser, 'Chrome') ? true : false; // All chrome
$internetexplorer = strpos($browser, 'IE') ? true : false; // All chrome
if ($firefox){
$browser = 'Firefox';
}else if ($chrome){
$browser = 'Chrome';
}else if ($internetexplorer){
$browser = 'Internet Explorer';
}
mysql_query("UPDATE activity SET last_page_view = '$PHP_SELF', browser = '$browser', time = '$time', date = '$date' WHERE user_id = $session_uid");
?>
<!doctype html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<META name="keywords" content="" />
<META name="description" content="">
<link rel="stylesheet" href="main.css" />
<TITLE>title</TITLE>
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-25371046-6']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
</head>
<body>
<div id="wrapper">
<div id="head_container">
<div id="header"><a href="index.php" alt="logo"><img src="logo.png" alt="logo" style="margin-left: 26px; margin-top: 6px;"></a>
</div>
<div id="stats">
<div id="counter">
<div style="width: 200px; text-align: center; font-family: arial; font-size: 12px;">Total Delievered<br />
<b><?php echo number_format($num); ?></b>
</div>
</div>
</div>
</div>
<div id="content">
I am thinking it has to be something simple I am missing .. Any help would be greatly appreciated