File "get_data.php"

Full Path: C:/wamp64/www/INVENTAPP/get_data.php
File size: 327 bytes
MIME-type: text/x-php
Charset: utf-8

<?php
include("conexion.php");

$dcto = $_POST['dcto'];

$query = "SELECT ubicacion, codprod, nprod, planillador, usuario FROM mvdcto WHERE TPDCTO='$dcto'";
$result = $conexion->query($query);

$response = array();
while($row = $result->fetch_assoc()){
    $response[] = $row;
}

echo json_encode($response);
?>