I get this error in the following part of the code:
<html>
<head><title>News</title></head>
<body>
<?php
session_start();
if (isset($_SESSION['permission']) && $_SESSION['permission'] == true) {
if (!isset($_POST['submitform'])) {
?>
You're allowed and inside!
<?php
}
} else {
echo "You are not allowed to access this page<br><br>";
}
?>
</body>
</html>
Error:
Warning: session_start(): Cannot send session cookie - headers already sent by (output started at URL/news.php:5) in URL/news.php on line 6
Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at URL/news.php:5) in URL/news.php on line 6
I use a login section with sessions.
What does this mean? Thanks for any help 🙂