Add to A $_POST Array through Multiple Refreshes
<p>I need to be able to store the $_POST data from a form (I'm doing that with the SESSION variable) and I need to add data to the $_POST array without overwriting the previous data.</p>

<p>Here's my original thread about the SESSION variables: <a href="http://stackoverflow.com/questions/14699824/store-array-variables-through-page-refresh-with-php">Store Array Variables Through Page Refresh with PHP</a></p>

<p>Here's an example of what I need to do:</p>

<p>There's a form on a page that you can put the width and height of a wall to calculate out how much paint/labor would be needed to paint the walls. Once the first wall dimensions are entered, the user can click the submit button labeled "Add Wall" to add another wall to their order.</p>

<p>After the first wall input, the POST data would return something like this:</p>

<pre><code>Array ( [wallW] =&gt; Array ( [0] =&gt; 9 ) [wallL] =&gt; Array ( [0] =&gt; 10 ) ) 
</code></pre>

<p>After the second wall is entered it would look something like this:</p>

<pre><code>Array ( [wallW] =&gt; Array ( [0] =&gt; 9 [1] =&gt; 20 ) [wallL] =&gt; Array ( [0] =&gt; 10 [1] =&gt; 15 ) ) 
</code></pre>

<p>This would continue on until the user has entered all of their walls.</p>

<p>I've tried doing <code>array_merge</code>, <code>array_append</code>, etc, but none of those seem to be working; it keeps overwriting what's tin the POST data, even if I bring the POST data into another array.</p>

<p>I know the easy thing would be to throw some jQuery in there, but this is for a PHP class (and we're not allowed to use SQL yet) so I'd like to try to figure this out with just PHP.</p>

<p>Any help would be awesome.</p>

<p>Thanks,</p>

<p>Chelsea</p>
