<?php session_start();
require_once("../config/config.php");

 $validateValue=$_REQUEST['fieldValue'];
 $validateId=$_REQUEST['fieldId'];
 
 $validateError= "This email is already exist";
 $validateSuccess= "seems ok";
 $alertType='1';// ADMIN=1 USER =0
 $userId='-1';
 $arrayToJs = array();
 $arrayToJs[0] = $validateId;
 $sql_select = "SELECT * FROM vendor_master WHERE emailId = '$validateValue'";
 $mysry=$conn->query($sql_select);
	$mydara= $mysry->fetchAll()  ;
	
	$rows_found = $mysry->rowCount();
 
 if ($rows_found > 0) {
	 $pagename='Admin Login';
	 $parameter=$validateId.' Value '.$validateValue.' ';
	 $alertdisplay='Success Admin Login ';
	 //addtocsystem_log($pagename,$parameter,$alertdisplay,$alertType,$userId);
 $arrayToJs[1] =false;
 echo json_encode($arrayToJs); // RETURN ARRAY WITH ERROR
 
 } else {
  $pagename='Admin Login';
	 $parameter= $validateId.' Value '.$validateValue.' ';
	 $alertdisplay='Invalid Admin Login Id';
	 //addtocsystem_log($pagename,$parameter,$alertdisplay,$alertType,$userId);
 $arrayToJs[1] = true;
 echo json_encode($arrayToJs); // RETURN ARRAY WITH success
 }

?>