View Full Version : How to submit several pages from a form at once
08-27-2005, 05:34 PM
I would like to have a Form that will consist of several pages - at least 2-4pages. Is there any way for only the last page to have the submit button? In otherwords, the visitor will not submit all the pages until they complete the last page, then that will send all of the pages at the same time. Can this be done with just straight HTML? ?or what is the solution?
08-27-2005, 05:47 PM
Basically you'd need to use a server side language - best would be PHP probably.
For example, let's say it's a 2 page form. You'd need the second form to hold the values from the first form, by using hidden fields.
eg. The first page contains the field for a username, they click a submit button, and the value is passed to the hidden field on the 2nd page (using Post).
<input type='hidden' name='username' value='<?php echo $_POST['username'];?>'>
For say a 5 page form, you'd need to build up the hidden fields on each page progression, passing all of the values to the next until you get to the final page.
Hope that helps. :p
08-27-2005, 06:21 PM
Thanks, for your help. This sounds to easy to be true. I'm not sure if I get the simplicity of it. Do I just add that script to each page to get the progressions?
08-28-2005, 01:56 PM
I'm not good with PHP so I'm sure someone can advise better, but the first page should submit to the second page, the second page should submit to the third page etc.
The second page takes the values from the first page and puts them into the hidden fields, then when the second page is submitted to the third, the third page takes the values from the second page and the hidden values from the first page.
Well, if you will take many variables and pass them through several pages, you might want to use the PHP Sessions. But, you have to really make sure you understand what you are doing and there's a learning curve... It is not just 'cut and paste'.
Powered by vBulletin® Version 4.2.2 Copyright © 2017 vBulletin Solutions, Inc. All rights reserved.