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

ini_set('display_errors', 1);
error_reporting(E_ERROR);

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

if (isset($_REQUEST['mobile'])) {
    $mobile = $_REQUEST["mobile"];
    $accode = $_REQUEST["accode"];
    
    $checkexist = mysqli_query($conn, "SELECT mobile,name FROM `accmast` WHERE `mobile`='$mobile' and `accode` != '$accode'") or die(mysqli_error($conn));
    if (mysqli_num_rows($checkexist) > 0) {
        $gcheckexist2 = mysqli_fetch_object($checkexist);
        echo "This Mobile No. {$gcheckexist2->mobile} Already Exist For {$gcheckexist2->name}";
    }else{
        echo "0";
    }
}

