Hello commnunity, i have somthing like this: (if this page needs the user to be logged)
if(!isset($_SESSION['usr_id'])){ //if not a logged user
$_SESSION['redir']=curPageURL();//Saving the current page for the redirection
header('Location: ../Session/loginFrm.php');
}
and in loginFrm.php, we do:
{...after validation}
if(isset($_SESSION['redir'])){
header('Location: '.$_SESSION['redir']);
}else{...}
in this page, they say we should use something like this instead:
...
require_once '../Session/loginFrm.php';
exit();
This doesn't work for me, the session variable now contains the included page, and not the current page.
What do you think about?