For some reason, the function that sets $SESSION[""] or $COOKIE[""] isn't working. - You'll have to set these values yourself. How do I do this?
You just have to check if the function returns 1. Just like this.
if(login($username, $password) == 1){
// execute the correct login code here. e.g.
// $_SESSION["username"] = $username;
// or
// setcookie("username", $username, time() + (86400 * 5), "/"); (btw 86400 is one day)
// and then access the cookie with
// $_COOKIE["username"];
}
A PHP framework that specializes in login and handling sessions.
Please use the framework.php script. Copy & paste. framework-true.php is just for me to check the framework version.