<?php
	
	require ('../../conn.php');
	
	$moduloelegido1 = $_POST['moduloelegido1'];
	
	$query1 = "select pkyComponent as cod, txtDescription as componente
	from
	srvComponent
	where 
	txtModuleDescription = '$moduloelegido1' and
	sysEnabled = 1 and sysAuthorized = 1 
	order by componente";
	$resultado1 = $mysqli->query($query1);
	
	$html= "<option value='0'>Todos</option>";
	
	while($row = $resultado1->fetch_assoc())
	{
		$html.= "<option value='".$row['cod']."'>".$row['componente']."</option>";
	}
	
	echo $html;
?>		