php redirect if not logged in

Solutions on MaxInterview for php redirect if not logged in by the best coders in the world

showing results for - "php redirect if not logged in"
Addison
18 Aug 2017
1if(!isset($_SESSION['login'])){ //if login in session is not set
2    header("Location: http://www.example.com/login.php");
3}