dynamic form javascript, php, mysql
<p>I already have javascript code to add multiple text fields:
What I want to know is how many fields were added and store them in mysql db </p>

<p>EX: 10 fields were added $_GET['1'], $_GET['2'] ............. $_GET['10']
how can I know that specific no of fields submitted to next page in php?</p>

<pre><code>&lt;html&gt;
&lt;head&gt;
&lt;script type="text/javascript"&gt;
var intTextBox=0;

//FUNCTION TO ADD TEXT BOX ELEMENT
function addElement()
{
intTextBox = intTextBox + 1;
var contentID = document.getElementById('content');
var newTBDiv = document.createElement('div');
newTBDiv.setAttribute('id','strText'+intTextBox);
newTBDiv.innerHTML = "Text "+intTextBox+": &lt;input type='text' id='" + intTextBox + "' name='" + intTextBox + "'/&gt;";
contentID.appendChild(newTBDiv);
}

//FUNCTION TO REMOVE TEXT BOX ELEMENT
function removeElement()
{
if(intTextBox != 0)
{
var contentID = document.getElementById('content');
contentID.removeChild(document.getElementById('strText'+intTextBox));
intTextBox = intTextBox-1;
}
}
&lt;/script&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;form action="testjs.php"&gt;
&lt;div id="content"&gt;&lt;/div&gt;
&lt;p&gt;&lt;input type="button" onclick="addElement()" value="ADD" &gt; &lt;input type="button" onclick="removeElement()" value="REMOVE" &gt;&lt;/p&gt;
&lt;input type="submit" value="SUBMIT"&gt;
&lt;/form&gt;
&lt;/body&gt;
&lt;/html&gt;
</code></pre>
