<?php
	require_once "conexion1.php";

	$id_departamento=intval($_REQUEST['id_departamento']);

	$municipios = $conn->prepare("SELECT * FROM provincia WHERE idDepa = '$id_departamento'") or die(mysqli_error());
		echo '<option value = "">Selecciona una provincia </option>';
	if($municipios->execute()){
		$a_result = $municipios->get_result();
	}
		while($row = $a_result->fetch_array()){
			echo '<option value = "'.$row['idProv'].'">'.utf8_encode( $row['provincia']).'</option>';
		}