<?php
session_start();

include("conexion.php");

@$xid = $_REQUEST['xid'];
@$xdistrito = $_REQUEST['xdistrito'];

@$xs_empresa=$_SESSION['s_empresa'];	

	?>			
	<script language="javascript">
	//alert("Tipooooooo")

	</script>										
	
	<?php

	
?>

<style type="text/css">
<!--
body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
}
-->
</style>

			<select  class="input_texto"  style="padding:3px; letter-spacing:-1px;"  name="xdistrito" id="xdistrito" >

			<option value=""></option>

					<?php
					
					$r_distrito=mysqli_query($conexion,"SELECT * FROM ubdistrito u WHERE idProv=$xid ORDER BY distrito;");											
					
					while($row_distrito=mysqli_fetch_array($r_distrito)){
					
					
					?>
					
			<option value="<?php echo $row_distrito['idDist']; ?>" <?php if($xdistrito==$row_distrito['idDist']){ ?> selected="selected" <?php } ?> ><?php echo $row_distrito['distrito']; ?></option>									

					
					<?php
					
					
					}
					
					
					?>
			</select>
				
								
			<script language="javascript">
				document.getElementById('xdistrito').value = '<?php echo $xdistrito; ?>';	

			</script>
									