Session gets lost and won't show on main page? |
Hi,
I have a problem, it's the same if I use the session library or not the same thing happens. I have my helper function loaded that when it's called it sets the session for the notification that needs to be displayed: PHP Code: function NotyI($string) I have a controller that calls this function NotyI when then notification should be spawned. PHP Code: NotyI("User is already registered!"); What can cause this problem? Thanks for your help!
Session works as expected, but I had an error in the code. I've set the session while the app was running under localhost domain after that, the header redirects to 127.0.0.1 and the session is then not valid on that domain. The above problem is solved by making sure that you set and check the session under the same domain!
Another question is there a way not to match an exact domain, but rather match multiple domains/subodmains?
Not really connected to your question, but why do you use the codeigniter instance in a helper?
Website: http://avenir.ro
It's because I need to access the session library.The library is loaded via autoload.php. I can't use it without the CI instance. I wanted to use the flash session that is implemented in CI session library because I need the session for only one request.
I could have set the session manually by using the $_SESSION var. Is there a way to use the loaded lib without the CI instance? |
Welcome Guest, Not a member yet? Register Sign In |