Forum Moderators: open
Another way would be to do it with multiple pages. Have only a section of your form on the first page and then submit that to the second page. Retrieve the posted data on the second page and place it in hidden fields - then add another section of your form to this page and submit to page 3. Just keep doing that until you've collected all the data.
The way you do a multiple page form is to store or pass the information from the first pages along to subsequent pages.
In the initial page, you can set a session id and cookie to "track" the visitor as they pass from page to page. On each submit, the information is stored in a database associated with the cookie you set. As a bonus you can have them choose a login ID and password on the first page of the form, this would allow them to return at a later time and finish the form.
A more simple but less secure way is each time they submit info, store all of the data in the next form as a hidden field. This requires that your subsequent forms be output as a part of the script. Perl example,
# Create hidden fields for all submitted data
foreach $v (keys %qs) {
if ($qs{$v}) {
$hiddens .= qq¦<input type="hidden" name="$v" value="$qs{$v}">\n¦;
}
}
print "content-type: text/html\n\n";
print qq¦
<form method="post" action="yourscript">
<input type="text" name="some-field">
<input type="hidden" name="step" value="2">
$hiddens
</form>
¦;
There are many other ways if you search about, but simply put you need a method to store the data from previously submitted pages on each subsequent page.
If we knew what restrictions you were working under regarding scripting languages somebody could give a far better targetted reply.