<?php
include 'db.php';

$idvisi = $_GET['idvisi'];
$data=array();

$q=mysqli_query($conn, "SELECT `namev`,`apellidov`, `emailv`, `celularv`, `tvisita`, `pvisita`,`tvvisita`,`marcav`,`tidenti`,`color`,`idD-VISITAS`, `user-caf_idUSER-CAF` from `datosvisitas` WHERE `idD-VISITAS` = '$idvisi'"); 

while ($row=mysqli_fetch_object($q)){
 $data[]=$row;
}
echo json_encode($data);

?>

