943,169 Members | Top Members by Rank

Ad:
  • PHP Discussion Thread
  • Marked Solved
  • Views: 48
  • PHP RSS
Sep 1st, 2010
0

How to post the $_post from a previous page?

Expand Post »
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.)
Last edited by rje7; Sep 1st, 2010 at 9:37 am.
Similar Threads
Reputation Points: 12
Solved Threads: 9
Junior Poster in Training
rje7 is offline Offline
83 posts
since Mar 2008
Sep 1st, 2010
0
Re: How to post the $_post from a previous page?
Quote ...
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.

http://www.jankoatwarpspeed.com/post...rd-jquery.aspx
http://thecodemine.org/
Reputation Points: 116
Solved Threads: 243
Veteran Poster
hielo is offline Offline
1,123 posts
since Dec 2007
Sep 1st, 2010
0
Re: How to post the $_post from a previous page?
kk... and thanks for the links.
Reputation Points: 12
Solved Threads: 9
Junior Poster in Training
rje7 is offline Offline
83 posts
since Mar 2008

This thread is solved

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.
Message:
Previous Thread in PHP Forum Timeline: ZippyShare embedded player generator
Next Thread in PHP Forum Timeline: cookie / session id





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC