I am using the cart class for a shoping cart.
Now I want to use the Simplelogin library, but the cart session is erased when I login.
How can this be solved ?
It is possible to use two sessions for one user ?
Or maybe merge all in the same session ?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I don’t know if this will help you, since I don’t use Code Igniter and don’t know how the stuff is handled there.
But I usually use sub-arrays for everything I do in sessions, so no vars are in danger of being overwritten. So if I have a login-script it would only save to $_SESSION[‘login’] (for example $_SESSION[‘login’][‘password_hash’])
If that’s not possible with code igniter or that library always deletes the session (what kind of library would do something like that???) you have to save the data somewhere else. Either in a hidden form field in the login-form (don’t forget to serialize the data first) or in a Cookie.