<?
if($submit)
{
 $i=0;
foreach($dr as $a)
{
 $dr1[$i]=$a; 
 print 'dr'.$dr1[$i];
 $i++;
}
print 'exiting..'.$basic;
}
?>

<script>
var cur=1;
var cur_D=1;
var als=[];
var als_D=[];
als[0]="one";
als[1]="two";

function insRow()
{
var x=document.getElementById('myTable').insertRow(cur)
var a1=x.insertCell(0)
var a=x.insertCell(1)
var y=x.insertCell(2)
var z=x.insertCell(3)	
a1.innerHTML="<center><input type=button value='-' onClick='delRow(this)'>";
a.innerHTML=cur
var value="<select name=dr[]>";

for(k=0;k<als.length;k++)
 value=value+"<option>"+als[k]+"</option>";

value=value+"</select>";
y.innerHTML=value
alert(value);

z.innerHTML="<input type=text name=amt[] id=dr"+cur+" size=10>"
cur++; 

}
</script>

<form action='$PHP_SELF'>
Add <input type="button" onclick="insRow()" value=" + ">
<center>
<table id="myTable" border="1" width=70%>
<tr><td width=50 align=center>Remove<td align=center>No.
<td align=center>Name<td width=100 align=center>Amount </td></tr>
</table><br>
<input type=submit name='save'>
</form>
