Can someone please tell me why this piece of code is generating a "headers already sent by.." error? This is at the very top of my PHP file, with no whitespace above it.
<?php session_start();
if ($pageID == 4) {
if ($_SESSION[bcalp_docs] != "XXXXXX") {
header("login.php");
die();
}
} ?>