I'm having a problem with an object i'm storing inside a session. My process is as follows:
Page 1 (form): Contains a simple form with serveral form fields. The form submits using the POST method to Page 2.
Page 2 (processing): This is a non-visual processing-only page. It takes the POST variables, puts them all into a "Form" object i wrote. The object uses a multidimensional array to store the name and value of the POST variables, as well as their type (email, postal code, password, etc.) and validity. The object is then validated using a custom validator object i wrote.
If the one or more of the fields turns out to be invalid the Form object is serialized, inserted into the session. The page is then server-side redirected back to Page 1. On Page 1 the object is unserialized back into a program-level object. The object works fine, with both the data and methods returning flawlessly from the unserialization. However, if i hit refresh or go to another page and click the back button to return to Page 1 it gives me an error. The error says that the unserialize command can no longer detect the serialized string within the session. For some reason, the session seems to be clearing the object.
I'm at a loss as to why this is happening. Has anyone else experienced anything similar?
Thanks in advance