Jay Blanchard wrote:
> [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>
>
Jay,
Sorry but I don't follow what your doing here. Form one doesn't need
an array, it only has one piece of data, the number of rows that form2
should have.
> /* 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
Form two has 2 fields for every line and the fields need to be kept in
separate arrays.
/* form2.php */
<form action="<?PHP Echo $_SERVER['PHP_SELF'] ?>" method="POST">
<input type="hidden" name="tiers" value="<?PHP ECHO
$_POST['form1info'] ?>">
<input type="text" name="tier[]">
<input type="text" name="price[]"><br>
<input type="text" name="tier[]">
<input type="text" name="price[]"><br>
<input type="text" name="tier[]">
<input type="text" name="price[]"><br>
<input type="submit" name="submit" value="submit">
</form>
Does that make more sense or am I just not understanding what your
trying to do?
Thanks,
Jeff
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php