how to create dynamic table in php and save data into database
<pre><code>//its my script that create table dynamically but data not save in DB 

                &lt;form&gt;
&lt;fieldset&gt;
&lt;table width="100%" id="dataTable" border="1"&gt;

                    &lt;th&gt;&amp;nbsp;&lt;/th&gt;
                    &lt;th&gt;&amp;nbsp;&lt;/th&gt;
                    &lt;th&gt;Organization Name&lt;/th&gt;
                    &lt;th&gt;Designation&lt;/th&gt;
                    &lt;th&gt;From&lt;/th&gt;
                    &lt;th&gt;To&lt;/th&gt;
                    &lt;th&gt;Brief Job Description&lt;/th&gt;

                        &lt;tr&gt;
                            &lt;td class="dark"&gt;&lt;input type="checkbox" name="chk"/&gt;&lt;/td&gt;
                            &lt;td&gt;&lt;input type="text" name="aaa" value="1" /&gt;&lt;/td&gt;
                            &lt;td class="dark"&gt;&lt;input type="text" name="org_name"/&gt;&lt;/td&gt;
                            &lt;td class="dark"&gt;&lt;input type="text" name="designation" &gt;&lt;/td&gt;
                            &lt;td class="dark"&gt;&lt;input type="text" name="from" &gt;&lt;/td&gt;
                            &lt;td class="dark"&gt;&lt;input type="text" name="to" &gt;&lt;/td&gt;
                            &lt;td class="dark"&gt;&lt;input type="text" name="job_description" &gt;&lt;/td&gt;

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

                    &lt;input type="button" value="Add Row" onclick="addRow('dataTable')" /&gt;

                    &lt;input type="button" value="Delete Row" onclick="deleteRow('dataTable')" /&gt;


            &lt;input type="submit" name="submit" class="btnLogin" value="Signup" onclick="return validate();" /&gt;
                &lt;/fieldset&gt;
                &lt;/form&gt;

&lt;script type="text/javascript"&gt;
        function addRow(tableID) {

            var table = document.getElementById(tableID);

            var rowCount = table.rows.length;
            var row = table.insertRow(rowCount);

            var cell1 = row.insertCell(0);
            var element1 = document.createElement("input");
            element1.type = "checkbox";
            element1.name="chkbox[]";
            cell1.appendChild(element1);

            var cell2 = row.insertCell(1);
            cell2.innerHTML = rowCount + 0;

            var cell3 = row.insertCell(2);
            var element2 = document.createElement("input");
            element2.type = "text";
            element2.name = "txtbox[]";
            cell3.appendChild(element2);

            var cell4 = row.insertCell(3);
            var element3 = document.createElement("input");
            element3.type = "text";
            element3.name = "txtbox[]";
            cell4.appendChild(element3);

            var cell5 = row.insertCell(4);
            var element4 = document.createElement("input");
            element4.type = "text";
            element4.name = "txtbox[]";
            cell5.appendChild(element4);

            var cell6 = row.insertCell(5);
            var element5 = document.createElement("input");
            element5.type = "text";
            element5.name = "txtbox[]";
            cell6.appendChild(element5);

            var cell7 = row.insertCell(6);
            var element6 = document.createElement("input");
            element6.type = "text";
            element6.name = "txtbox[]";
            cell7.appendChild(element6);


        }

        function deleteRow(tableID) {
            try {
            var table = document.getElementById(tableID);
            var rowCount = table.rows.length;

            for(var i=0; i&lt;rowCount; i++) {
                var row = table.rows[i];
                var chkbox = row.cells[0].childNodes[0];
                if(null != chkbox &amp;&amp; true == chkbox.checked) {
                    table.deleteRow(i);
                    rowCount--;
                    i--;
                }


            }
            }catch(e) {
                alert(e);
            }
        }
    &lt;/script&gt;




//my php code please help me 
&lt;?php

error_reporting(0);

include("admin_config.php");

    if($_REQUEST['submit']!="")

        {
            $cell2              =   $_REQUEST['aaa'];
            for($i=0 ; $i&lt;= $cell2 ; $i++)
            {
        $orgname            =   $_REQUEST['org_name'];
        $designation        =   $_REQUEST['designation'];
        $from               =   $_REQUEST['from'];
        $to                 =   $_REQUEST['to'];
        $job_description    =   $_REQUEST['job_description'];

$qry    =   "INSERT INTO `tech_profile`(`tech_id`, `organization_name`, `designation`, `from`, `to`, `job_description`) VALUES ('$auto_num','$orgname','$designation','$from','$to','$job_description')";
        $res                =   mysql_query($qry);
            }
        /*if(mysql_num_rows($res) &gt; 0)
        {
            echo"enter data";
        }
        else
        {
            echo"not insert";
        }*/
        }
?&gt;
</code></pre>
