How To Input Data from dynamic number of fields in html form
<p>this code is to create dynamic number of fields and to send data.. this is doing it's work...
but then i try to back.php(where form sends the data ) i don't know hoe to get the exact number of rows... id = 0_1 .... 3_1 there are many options.. but what is the exact number to counting to make a loop...
please help  me on this asap ...</p>

<pre><code>&lt;html&gt;
    &lt;head&gt;
        &lt;title&gt;Infinite Form Rows&lt;/title&gt;
        &lt;script 
            type="text/javascript" 
            src="http://cachefile.net/scripts/jquery/1.2.3/jquery-1.2.3.min.js"&gt;
        &lt;/script&gt;
        &lt;script type="text/javascript"&gt;
        $(function(){

            var newRowNum = 0;


            $('#addnew').click(function(){

                newRowNum += 1;


                var addRow = $(this).parent().parent();

                var newRow = addRow.clone();


                $('input', addRow).val('');


                $('td:first-child', newRow).html(newRowNum);



                $('input', newRow).each(function(i){
                    var newID = newRowNum + '_' + i;
                    $(this).attr('id',newID).attr('name',newID);
                });


                addRow.before(newRow);


                $('a.remove', newRow).click(function(){
                    $(this).parent().parent().remove();
                    return false;               
                });


                return false;
            });
        });
        &lt;/script&gt;
    &lt;/head&gt;
    &lt;body&gt;
        &lt;form action="back.php" method="get"   &gt;
            &lt;table id="tabdata"&gt;
                &lt;thead&gt;
                    &lt;tr&gt;
                        &lt;th&gt;Row&lt;/th&gt;
                        &lt;th&gt;Cell 1&lt;/th&gt;
                        &lt;th&gt;Cell 2&lt;/th&gt;
                        &lt;th&gt;Cell 3&lt;/th&gt;
                        &lt;th&gt;&lt;/th&gt;
                    &lt;/tr&gt;
                &lt;/thead&gt;
                &lt;tbody&gt;
                    &lt;tr&gt;
                        &lt;td&gt;&lt;a id="addnew" href=""&gt;Add&lt;/a&gt;&lt;/td&gt;
                        &lt;td&gt;&lt;input id="n0_1" name="n0_1" type="text" /&gt;&lt;/td&gt;
                        &lt;td&gt;&lt;input id="n0_2" name="n0_2" type="text" /&gt;&lt;/td&gt;
                        &lt;td&gt;&lt;input id="n0_3" name="n0_3" type="text" /&gt;&lt;/td&gt;

                        &lt;td&gt;&lt;/td&gt;
                    &lt;/tr&gt;
                    &lt;tr&gt;

                    &lt;/tr&gt;
                &lt;/tbody&gt;
            &lt;/table&gt;

            &lt;input id="go" name="go" type="submit" value=" Save " /&gt;
        &lt;/form&gt;
    &lt;/body&gt;
&lt;/html&gt;
</code></pre>
