ok, let's say we have four pages: form1.php, form2.php, form3.php, and form4.php:
form1.php just has the form, we submit selections named selection1 and selection2.
so then, form2.php has this code:
PHP Code:
<?php
$selection1 = $_POST['selection1'];
$selection2 = $_POST['selection2'];
?>
then, you just put the info into hidden inputs, and this is still form2.php:
Code:
<input type="hidden" name="selection1" value="<?=$selection1 ?>" />
<input type="hidden" name="selection2" value="<?=$selection2 ?>" />
Make sure the php code is at the top of the page.
Add the other selections, selection3 and selection4 for form2.php then submit the form to form3.php.
form3.php would be like this...say there's 2 more selections on form3, selection5 and selection6:
PHP Code:
<?php
$selection1 = $_POST['selection1'];
$selection2 = $_POST['selection2']; //we carry the other two over from form1.php
$selection3 = $_POST['selection3'];
$selection4 = $_POST['selection4']; //and we carry the two over from form2.php
?>
then, we do the inputs again:
Code:
<input type="hidden" name="selection1" value="<?=$selection3 ?>" />
<input type="hidden" name="selection2" value="<?=$selection4 ?>" />
and we do this for the other page(s)...
do you get the pattern?
Bookmarks