Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 1 of 1
Thread: SESSION and Wizard Form?
01-07-2006, 09:55 PM #1
- Join Date
- Jul 2005
- Thanked 0 Times in 0 Posts
SESSION and Wizard Form?
I am creating a wizard which is like a multipages form. I have a wizard class and several other classes for the fields. Each time I load the wizard, I use "new" to allocate the wizard. I use $_SESSION to store the field data user enters.
Is there a reason in term of efficiency and memory usage why I don't just save the whole wizard object into the $_SESSION instead of saving individual field data into the $_SESSION? I can just do "$wizard = &$_SESSION['wizard'];" every time I load the wizard after the first page. And I don't think it uses more memory because it's using the same copy of wizard object all the time.
The one thing I think of is if I plan to save session into database because I need to use multiple web server, I will have problem saving the whole wizard object into database. Even if I can, it may take much more space than just the field data.
Last edited by dealmaker; 01-07-2006 at 10:00 PM.