Sorry i reached the limit on the last one ...
The check login session file session.php5
session_start();
function checkLoggedin(){
if (!isset($_SESSION["id"])){
redirect("login.php5");;
}
}
function confirmLoggedIn(){
if (isset($_SESSION["id"])){
return true;
} else {
return false;
};
}
function logOut(){
$_SESSION = array();
if(isset($_COOKIE[session_name()])){
setcookie(session_name(),"",time()-42000,"/");
}
session_destroy();
redirect("index.php5");
}
functionsuni.php5 just runs the query and returns the result
I have tried using session-write-close() after setting which did not work. I stopped the script from re-directing to the index page and echoed the session variables and they are all there, they just get deleted when i switch pages? I am pulling my hair out can any one help?
Response from
ini_set ("display_errors", "1");
error_reporting(E_ALL);
on the login page ( I disabled the re-directs for this.
Notice: Undefined index: forgot in C:\xampp\htdocs\login.php5 on line 8