<?php

include("include/db.php");


//  admin affiliate declined
if(isset($_REQUEST['resource']) && $_REQUEST['resource'] =='mobile_exists_check')
{	
	$mobile=isset($_POST["number"]) ? $_POST["number"] : '';
	
    $query="select unique_user_id from registration where LOWER(user_mobile) = '".strtolower(trim($mobile))."' ";
    $result=mysqli_query($conn,$query);
    $count=mysqli_num_rows($result);
    if($count >0)
    {
		echo 1;
    }
	else
	{
		echo 2;
	}
	die;
}


$email=isset($_POST["email"]) ? $_POST["email"] : '';

$query="select unique_user_id from registration where LOWER(user_email) = '".strtolower(trim($email))."' ";
$result=mysqli_query($conn,$query);
$count=mysqli_num_rows($result);
if($count >0)
{
	echo 1;
}
else
{
	echo 2;
}





?>



 