Real problems here.
I can pass a single array with no problems, but when i try to do two it messes up, only registering the last passed array to both names.
Here is how I pass the arrays:
// Register an error array - just in case!
if (!session_is_registered($theerrors))
session_register($theerrors);
// Set up a $formVars array with the POST variables and register with the session.
if (!session_is_registered($theformvars))
session_register($theformvars);
$_SESSION[$theerrors] = serialize($errors);
$_SESSION[$theformvars] = serialize($formVars);
And then this is how I try retrieve the arrays back onto the next page:
session_start();
$errors = unserialize($_SESSION[$theerrors]);
$formVars = unserialize($_SESSION[$theformvars]);
What the problem is that both $server[$theerrors] and $server[$theformvars] are the same value as serialize($formVars).
or if I take out
$_SESSION[$theformvars] = serialize($formVars);
then they are both the same value as serialize($theerrors)
and I have checked with session_encode() what name the array is going under within the session which is "a" all the time which I dont understand. I think the problem is this but I dont know how to get them named properly.
I'd very much appreciate some help on this as i'm pulling my hair out.
Mladen