Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 1 of 1
  1. #1
    Regular Coder
    Join Date
    Jul 2005
    Posts
    342
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question SESSION and Wizard Form?

    Hi,
    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.

    Many thanks.
    Last edited by dealmaker; 01-07-2006 at 10:00 PM.


 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •