Hello. I've read suggestions regarding this error. Everyone says that the problem is that I am outputting to the browser (whitespace included) before sending a header. Apparently, this is unallowed. But I'm not outputting anything. Here's the only code that's in my index.php file:
<?php
error_reporting(E_ALL);
$eulacookie = $_COOKIE['eularead'];
if ($eulacookie == 'y')
{
//redirect if cookie has been set
header("Location: http://blahblahblah.com/hey.php");
}
else
{
//redirect if cookie has NOT been set
header("Location: http://blahblahblah.com/hey2.php");
}
?>
If I take the error_reporting() function out, everything works. But with that function in, I get the following error:
Notice: Undefined index: eularead in /home/virtual/site109/fst/var/www/html/index.php on line 2
Warning: Cannot modify header information - headers already sent by (output started at /home/virtual/site109/fst/var/www/html/index.php:2) in /home/virtual/site109/fst/var/www/html/index.php on line 14
What's causing this? I'm not outputting anything to the browser, yet the error message that I'm getting kind of indicates this (according to previous posts that I looked at). Thanks.