What is wrong with this PHP code?

<?php
session_start();

if (!$_SESSION["valid_user"])
{
Header("Location:login.php");
}

include('includes/header.php');
echo "<p>User ID: " . $_SESSION["user_id"];
echo "<p>Username: " . $_SESSION["user_name"];
echo "<p>Logged in: " . date("m/d/Y", $_SESSION["login_time"]);

?>


The page keeps displaying:

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at C:\...\index.php:1) in C:\...\index.php on line 1

Warning: Cannot modify header information - headers already sent by (output started at C:\...\index.php:1) in C:\...\index.php on line 5
It is the entire file.
 
Back
Top