<script>
function loop_insert(){
var num=document.getElementById('row_tb').value
for(i=1;i<=num;i++){
insert_row()
}
}
function insert_row(){
var myTable=document.getElementById('myTable')
var current_row=document.getElementById('myTable').rows.length
var x=myTable.insertRow(current_row) // insert new row
var y=myTable.rows // get attribute of row
var a=x.insertCell(0) // assign position of cell 1 in new row
var b=x.insertCell(1) // assign position of cell 2 in new row
var c=x.insertCell(2) // assign position of cell 3 in new row
var d=x.insertCell(3) // assign position of cell 4 in new row
var f=x.insertCell(4) // assign position of cell 5 in new row
var e=x.insertCell(5) // assign position of cell 6 in new row
var g=x.insertCell(6) // assign position of cell 7 in new row
a.innerHTML=current_row
b.innerHTML="<input type='text' name='Description[]' size='40' id='txtDescription' />"
c.innerHTML="<input type='text' name='Supplier_name[]' size='40' id='txtSupplier_name' />"
d.innerHTML="<input type='text' name='Size[]' size='3' id='txtSize' />"
f.innerHTML="<input type='text' name='Quantity[]' size='6' id='txtQuantity' />"
e.innerHTML="<input type='text' name='Prize[]' size='3' id='txtPrize' />"
g.innerHTML="<input type='text' name='Source[]' id='txtSource' />"
}
</script>
var txt = new Array();
var multi_txt = document.form1.elements["txt[]"];
for(i=0;i<multi_txt.length;i++)
{
txt[i] = multi_txt[i].value;
}
var url = 'test2.php';
var pmeters = "txt[]=" + encodeURI(txt)