<?php



    require_once('../odbconexion/config.php');

    $email=!empty($_REQUEST['email'])?$_REQUEST['email']:'';

    $celular=!empty($_REQUEST['celular'])?$_REQUEST['celular']:'';

    $action=!empty($_REQUEST['action'])?$_REQUEST['action']:'';

    switch($action){

    	case "email":

    	$Odbj_conexion = new odbconexion;

	   	$conexion=$Odbj_conexion->openconection();

	    $consulta="SELECT * FROM login_appquadrata WHERE Login_Correo = '$email'";

	    $Array_adapter=$conexion->query($consulta);

	    $conexion->close();

	    echo json_encode($Array_adapter->num_rows);

    	break;

    	case "celular":

    	$Odbj_conexion = new odbconexion;

	   	$conexion=$Odbj_conexion->openconection();

	    $consulta="SELECT * FROM login_appquadrata WHERE Login_Telefono = '$celular'";

	    $Array_adapter=$conexion->query($consulta);

	    $conexion->close();

	    echo json_encode($Array_adapter->num_rows);

    	break;

    }

?>



