I have the following site in 2 different hosts.in first no problem at all. In second (bluehostia) thought the site says when you try to load it the following :
Warning: Cannot modify header information - headers already sent by (output started at /home2/winninj3/public_html/index.php:12) in /home2/winninj3/public_html/index.php on line 15
Test cookie not sent
why is this happening? please if anyone can help i ve spend many hours searching and nothing
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><title>The test page! </title>
<META NAME="keywords" CONTENT="test page, test, page">
<META NAME="description" CONTENT="Test page">
<META NAME="ROBOTS" CONTENT="ALL">
</head>
<body>
<div>
<table width="339" border="0" align="left">
<tr>
<td width="333">Visitors :
<?php
function cookies_enabled()
{
$cookie_sent = setcookie('tc','ok',time()+3600);
if($cookie_sent == false){die('Test cookie not sent');}
$redirected = (isset($GET['cs']) && $GET['cs'] == '1' ? $GET['cs'] : '0');
if($redirected == '0')
{
header('Location: '.$SERVER['PHP_SELF'].'?cs=1');return;//or should I put exit() ?
}
return (isset($COOKIE['tc']) && strcmp($COOKIE['tc'],'ok') === 0);
}
if(cookies_enabled())include("ccode.php");
else echo 'please enable cookies to count';
?>
</td>
</tr>
</table>
</div>
</body>
</html>