<?php
    $json = file_get_contents('php://input');   
    $obj = json_decode($json);
    $id = $obj->flag;
    // Returns a Json
    header('Content-Type: application/json');


    $conn = new mysqli("directoriofitness.com.mx", "direct18", "L4LL4v3M@3str@",$obj->bd);
    $query = "SELECT * FROM prospectos WHERE qr = '$obj->qr'";
    $resultado = $conn->query($query);
    if($resultado->num_rows > 0){
        echo 'ok';
    }else{
        echo 'no';
    }
    
    $conn->close();
?>