php redirect if not logged in
snippet in php

php redirect if not logged in

user7887

if(!isset($_SESSION['login'])){ //if login in session is not set
    header("Location: http://www.example.com/login.php");
}