Hi All,
I have developed php login system.
If user successfully logged in system will create a session call, $_SESSION['username'];
Now I want to redirect user, if not logged in when try to view specific page.
Please help me to write a code.
I already wrote a code,
but it is not working.
if(empty($_SESSION['username'])){
header ("Location : login.php");
}