still losing session userdata across a redirect |
(12-04-2017, 08:58 PM)skunkbad Wrote: I use PHP's header function, which does not use exit. Years ago I was having problems with a redirect and session combination, and I read somewhere that the redirect needs to be done before the session write, so I've been doing it that way ever since. That's all I know, and if it's wrong then I don't know much My assumption - that you were using the CI helper function redirect() - was the source of my confusion. I don't know if it's right or wrong but if it works then who am I to blow against the wind? That said, I'm at a complete loss as to how doing this PHP Code: header('Location: http://www.mysite.com/someotherpage.php'); would produce results different than this PHP Code: $_SESSION['item'] = 'xyz'; |
Welcome Guest, Not a member yet? Register Sign In |