<?php
	
	require ('../../conexion.php');
	
	$cdgcanton = $_POST['cdgcanton'];	
	$cdgprovin = $_POST['cdgprovin'];
	$cdgdistri = $_POST['cdgdistri'];
	
	$queryM = "SELECT cdgbarrio, dscbarrio FROM hac_barrios WHERE cdgprovin = '$cdgprovin' AND cdgcanton = '$cdgcanton' AND cdgdistri = '$cdgdistri' ORDER BY dscbarrio";
	$resultadoM = $mysqli->query($queryM);
	
	$html= "<option value=''>Seleccione Barrio</option>";
	
	while($rowM = $resultadoM->fetch_assoc())
	{
		$html.= "<option value='".$rowM['cdgbarrio']."'>".$rowM['dscbarrio']."</option>";
	}
	
	echo $html;
?>		