RE: [PHP] Re: From form to an array
| From: | Jay Blanchard | Date: | Mon, 17 Nov 2003 21:40:15 +0000 |
| Subject: | RE: [PHP] Re: From form to an array | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-170016@lists.php.net to get a copy of this message | ||
[snip]
Ok, now on submit of this second form I want to take field1 from each
line and put it into $array1 and field2 from each line and put it into
$arrray2.
[/snip]
Form 1's info would have to be held as hidden fields in Form 2's
construction. An example ...
/* formOne.php */
<form action="nextForm.php" method="POST">
<input type="text" name="formOneArray[]">
<input type="submit">
</form>
/* nextForm.php */
<form action="processForms.php" method="POST">
<input type="text" name="formTwoArray[]">
<input type="text" name="formTwoArray[]">
<input type="hidden" name="formOneArray[]" value="<?php echo
$_POST['formOneArray[0]']; ?>
</form>
Not tested, but should be pretty close