php session

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sreenisha
    New Member
    • Aug 2008
    • 27

    php session

    HI all
    I have a problem regarding registration forms.I have a long form for registration.So i am planning to set personnal details in one page,Educationa l in another page etc.I am also maintainging separate tables for each forms.Now for me when one page is completed, a next button will be there to go to next page.But whenever i, do this the next page is opened but the values entered in first page is lost.
    I need help in completeing the forms in a way that only after the final submit button is clicked all the values entered in eachpage should move into its corresponding tables.
    How can i do this in php?Anyone please help me.
    Thanx in advance.
  • Atli
    Recognized Expert Expert
    • Nov 2006
    • 5062

    #2
    Hi.

    You will obviously have to process the data sent by the first form before showing the second form or the data will be lost.

    The best way would probably be to have each form submit it's data to a process page and have the process page redirect to the next part of the form once it is done. To make sure the first page is completed before the second page, a session value could be set after the first page is processed that needs to be present before showing the second page.

    Another way would be to have the second page store the data from the first page in the session and have a single process page at the end of all the forms.
    But it is generally not a good idea to bloat the session with stuff like this, so the first method would probably be better.

    Comment

    • sreenisha
      New Member
      • Aug 2008
      • 27

      #3
      Ok.
      But how it is done?Can u provide me with a piece of sample code for setting the sessions.
      Thank u.

      Comment

      • Atli
        Recognized Expert Expert
        • Nov 2006
        • 5062

        #4
        I wrote an article about the basic use of sessions some time ago. (http://bytes.com/forum/thread644923.html ).
        That might help.

        Comment

        Working...