I have a page that display two different things depends on whether the information was entered by uploading a file or entering a form. So i have a variable I have named "option" that changed depends on which of these was performed. I have this working using a session as I cannot use "$_POST" because it goes from the index page to a php page and back to the index page again. However, because I am using a sessions (which is also used for my login), the variables are destroyed when i close the browser (and I need them to stay as they are forever), however, I cannot change the length/life of the session because I want users to be logged out automatically when the close the browser. Is there another way that I can transfer these varible along the pages?
Actually, I've done something that has it working.. when the session starts the variable is one of 2 things, and each of these has a loop, so I've just made a variable equal to the sessions (kind of reverse of what I do for it to go through the php page) and this works throughout the whole thing. Thanks for your help anyway
Nope turns out that isnt working, seemed to work for one but not the other.... Is there a simple way to pass these variables without them being reset?
You mentioned in the OP that you needed $option to stay set forever; If you are using sessions for authentication does it also use mysql to store user info? If so you could create another column in an existing table or a separate table in your DB to store that info. Then when the same user logs in again $option will be available, same as last time.