I add this code to my php page:
<?php
session_start();
if(!isset($_SESSION['username'])){
header('Location: login.php');
}
?>
As I said it`s on top of my page but redirect does not work I have got a message in browser "we can't reach this page."