Forum Moderators: coopster
Everything works but when I try to set a new session variable in the remote file (functions file).
The functions file is linked to the login.php via require(); and is not .php extention (parse errors fix). My code to set a new session variable works in the login.php (but not in remote file - problem), and is:
$_SESSION['var1'] = "textstring";
$_SESSION['var2'] = $textvar;
^^in functions file
The only difference in my login.php file the session variable is set: $_SESSION['var3'] = funct1(); <<which returns a string.
Thanks in advance :)
I'll try setting the session vars before the session regeneration :)
Here is my code (not working):
<<Before: the login function, testing for valid username, password, etc so this bit is the last of a list of else statements: $user and $pass are passed into the function>>
//Value for cookie
$kval = md5(md5($pass));
//Set a validation Cookie
setcookie("name",$kval, time() + 86400,"/folder",".domain.com",0);
//Regenerate the Session ID
//OFF session_regenerate_id();
//Issue the Session with a Loggedin/username var
$_SESSION['loggedin'] = "yes";
$_SESSION['user'] = $user;
<<AFTER goes on to log the login to a log file, set some variables for the output and calls the html output function, then exit;>>
This is in the remote file^^