Something on the lines of if I understand your question:
Login.php
session_start();
if(isset($_POST)):
$_SESSION['loggedIn'] = TRUE;
endif;
Profile.php
session_start();
if(!isset($_SESSION['loggedIn'])):
header('Location: login.php');
endif;
1
solved What can i make for this session please help me [closed]