How do I loop through an array of dynamically (jQuery) generated texareas and post the values to the same page?
<p>I'm generating a number of textareas with jQuery. I want to retrieve the values of all the filled out textareas via an on-page POST method (it's kind of a proof of concept, quick and dirty, I wouldn't do this normally), but when I hit submit, I get the value of only one, whichever is the last textarea value posted. I imagine I can do this with an array and a foreach loop, but am unsure how to do it, given all the additions of the jQuery/on-page factors complications in this endeavor. I also imagine it might have something to do with all of the generated textareas having the same name... anyone?</p>

<p>Here's the code-</p>

<pre><code>    &lt;script type="text/javascript"&gt;
        $(document).ready(function() {

            $('.textadder').click(function(){
            $("form").append("&lt;p class='introText2'&gt;Enter More Text&lt;/p&gt;&lt;textarea rows='5' cols='20' name='textForm' class='formText2'&gt;&lt;/textarea&gt;");
        });



    });/*document ready*/

&lt;/script&gt;

&lt;?php

if (isset($_POST['textForm']))
{
$formTxt = $_POST['textForm'];
        echo $formTxt;
}
?&gt;
&lt;/head&gt;

&lt;body&gt;


&lt;div id="wrapper"&gt;
    &lt;div id="submittedHolder"&gt;&lt;/div&gt;
    &lt;div class="formBox"&gt;
        &lt;form method="post" action=""&gt;
            &lt;p class="introText"&gt;Please Enter Some Text&lt;/p&gt;
            &lt;textarea rows="5" cols="20" name="textForm" class="formText"&gt;&lt;/textarea&gt;
            &lt;input type="submit" class="submitter" value="Submit"&gt;
        &lt;/form&gt;

        &lt;div class="textadder"&gt;&lt;p&gt;More Text&lt;/p&gt;&lt;/div&gt;
        &lt;div class="clearer"&gt;&lt;/div&gt;
    &lt;/div&gt;&lt;!--formBox--&gt;
&lt;/div&gt;&lt;!--wrapper--&gt;


&lt;/body&gt;

&lt;/html&gt;
</code></pre>

<p>Thanks!</p>
