<?php

require("includes/check_auth_user.php");
require("includes/dbconnect.php");
include ('includes/function.php');

$zdb = $_SESSION["zdbyear_" . $dbname];
mysqli_select_db($conn, $zdb);
$admin = $_SESSION["admin_" . $dbname];

if ($_REQUEST["ctr"]) {
    $ctr = $_REQUEST["ctr"];
    $hide = $_REQUEST["hide"];
    $hide_var = "";
    if ($hide == 0) {
        $hide_var = 'style="display:none;"';
    }
    $mctr = $ctr;
    $mctr++;

    Echo "<tr>";
    Echo "<td style='text-align:center'><i class='fa fa-close remove' ></i></td>";
    echo "<td><input type='text' class='form-control form text-center srno'    name='srno_$ctr'     value='$mctr'></td>";
   
    echo "<td>";
    echo "<select class='form-control form  select2 fetchpart_$ctr' name='expname_$ctr' style='width:100%'>";
    echo "<option value=''></option>";
    $gexp3 = mysqli_query($conn, "SELECT `accode`,`name` FROM `accmast` WHERE accode > '51' AND grpcode = '012' ") or die(mysqli_error($conn));
    while ($iexp3 = mysqli_fetch_array($gexp3)) {
        echo "<option value='$iexp3[accode]'>$iexp3[name]</option>";
    }
    echo "</select>";
    echo "</td>";

    echo "<td><input type='text' class='form-control text-right form amount' name='amount_$ctr' value='0'></td>";

    Echo "</tr>";
    $ctr++;
} else {
    echo "ERROR";
}
?>
 