<?php 

include('include/dbConfig.php');

if(isset($_POST["phone"])){
    // echo $_POST['phone'];
    
  $q = "SELECT * FROM customers WHERE customer_phone = '971".$_POST["phone"]."'";
//   echo $q;
    $query = $db->query($q);
    
    // if(mysqli_num_rows($query)==0){
    //     echo '<p  class="text-success" id="greeen" >Lets Go!</p>';
    // } else {
    //     echo '<p  class="text-danger" id="redd" >This customer Already exists</p>';
    // }
    
              
                
    if(mysqli_num_rows($query)==0){
        echo 1;
    } else {
        echo 0;
    }
    
                                                
                                                            
}

?>