<?
 session_start(); 
 include("../opendb.php");
$re=mysqli_query($db,"select code,acname from customer");
while($row=mysqli_fetch_array($re))
{
 $sql="insert into ledger values('$row[acname]','Sundry Debtors','0','Dr','$row[code]','$brcode')";
 mysqli_query($db,$sql) or die(mysqli_error($db));
}
?>
