I am trying to split up the registration form into two php pages. Is it possible for the second page to submit its form along with the $_post which contains the information from the first page? well the question should be.. is there a function in php which will bind the $_post variable to the current form submit method?
The other ways to get this working are the hidden fields, sessions, cookies. Can i do without these?
page1.php (submit)-> page2.php (submit the form along with $_post/$_get) -> page3.php (where i'll do database manipulations.)
Is it possible for the second page to submit its form along with the $_post which contains the information from the first page?
No. as soon as page2 completes execution (basically once it loads in your browser) the current page variables cease to exist. The only reason why the data is maintained across visits is because the browser and the server send a cookie back and forth that identifies a unique file on the server where the $_SESSION info for that particular user is stored.
Quote ...
The other ways to get this working are the hidden fields, sessions, cookies. Can i do without these?
No.
But the approach you described above is server-side. What you can do is to show one form at a time on the browser but do not submit the form right away. Instead, you show form 1 then go "Next" and the current form will hide and the other set of fields will appear. Then "Next", etc. Finally, when the user clicks finish, THEN you actually submit to the server. Ultimately (if you do things right) you will do ONE submission to the server.
Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.
This thread is more than three months old
No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.