For some reason I am gettign the same errors. Any help would be great!
Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /xxx/sessions.php:1) in /xxx/sessions.php on line 2
Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /xxx/sessions.php:1) in /xxx/sessions.php on line 2
views = 1
My code is simply and without white space:
<?php
session_start();
if(isset($SESSION['views']))
$SESSION['views'] = $SESSION['views']+ 1;
else
$SESSION['views'] = 1;
echo "views = ". $_SESSION['views'];
?>