Hello,
I have a problem passing the values of the form variables between pages when I want to save them in session.
I'm using sessions for saving another values that don't come from the form, and all of them are saved in the session correctly. For example I'm saving the user and the profile once the user is logged, and I pass this value through all the pages without any problem. But now I have to save some values of a form, just in case the user wants to come back and see the values that previously had inserted.
When I print the session in the page where I'm reading the form variables, all of them are set correctly, but when I go back they are empty, but the ones that I had previously are saved correctly.
I was looking for a solution in different forums, I change the name of the variable of the session (at the beginning the name of the session variable and the variable form were the same, and this was giving me problems). I did everything I can think, but the problem is still there.
I'm not sure if it's a problem with the global variables.... In my php.ini are off, and I wouldn't like to change this.
Many thanks
Session problem between pages
Moderator: General Moderators
- Christopher
- Site Administrator
- Posts: 13596
- Joined: Wed Aug 25, 2004 7:54 pm
- Location: New York, NY, US
Re: Session problem between pages
Are you sure you are calling session_start() before every use of $_SESSION?
(#10850)
Re: Session problem between pages
Hey Lauryn1298, I think I'm running into the exact same issue as you are which I posted about here not too long ago:
viewtopic.php?f=1&t=114448
Unfortunately I haven't made much more progress on this since my post and i'm waiting to hear back from my hosting provider to see if they've had any luck troubleshooting. Have you been able to figure this out?
viewtopic.php?f=1&t=114448
Unfortunately I haven't made much more progress on this since my post and i'm waiting to hear back from my hosting provider to see if they've had any luck troubleshooting. Have you been able to figure this out?