By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,278 Members | 1,359 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,278 IT Pros & Developers. It's quick & easy.

php session

P: 27
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,Educational 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.
Oct 18 '08 #1
Share this Question
Share on Google+
3 Replies


Atli
Expert 5K+
P: 5,058
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.
Oct 18 '08 #2

P: 27
Ok.
But how it is done?Can u provide me with a piece of sample code for setting the sessions.
Thank u.
Oct 18 '08 #3

Atli
Expert 5K+
P: 5,058
I wrote an article about the basic use of sessions some time ago. (http://bytes.com/forum/thread644923.html ).
That might help.
Oct 18 '08 #4

Post your reply

Sign in to post your reply or Sign up for a free account.