Welcome Guest, Not a member yet? Register   Sign In
still losing session userdata across a redirect
#22

(12-02-2017, 01:42 PM)skunkbad Wrote: I don't think anyone else has mentioned it, but I've learned that there can be problems with the order that you set session data and do the redirect. I always set the redirect before writing to the session. I've had problems changing that order in the past.

I must not understand what you mean by "set the redirect". What I think when I read "set the redirect before writing to the session"  is code like this.

PHP Code:
redirect('somewhere');
$_SESSION['item'] = 'xyz'

Which is nonsense since the CI function redirect() does not return meaning the next line of code will never have a chance to execute.

So, what do you mean?
Reply


Messages In This Thread
RE: still losing session userdata across a redirect - by dave friend - 12-04-2017, 03:17 PM



Theme © iAndrew 2016 - Forum software by © MyBB