now i know that there is a thing that "you cant stay logged inforever" but isnt there some sort of ultra cookie that doesnt get cleared when a user is clearing their cookies from their browsers?
and when someone logs out of my site, i set the session to expired.
anyways. i have a sign in code and a sign out code, i need help with making it so the user NEVER logs out unless they click "SIGN OUT" on my page.
obviously, if the user doesnt have the cookie or whatever then they wont be able to sign in and will be signed out imediately but how do i incorporate this.
does it have to use an "super cookie" or can php sessions stay forever if u set them?
just wondering. and please help if u can.
obviously theres an added page i didnt mention yet (the sign in check included on every page)
and obviously when a user first signs in im checking if there password matches there username.
SIGN IN)all i do is set the session variable(
$_SESSION[check] = "signed in";
SIGN IN CHECK PAGE)check if the variable isnt empty, if it is, sign them out(
if($_SESSION[check] == "") //if your variable isn't there, then the session must not be
{$_SESSION = array();
session_unset();
session_destroy();
if (isset($_COOKIE[session_name()])) {
setcookie(session_name(), '', time()-55, '/');
}
and then i set the cookie to a negative expiration. right?
NOW THE SIGN OUT PAGE just contains the above code without the check.
just help please.