<?php
  $Position   = '../';
  require_once($Position.'config/config.php');
  require_once($Position.'config/conexion.php');
  $val = $_POST['cat'];

  //CatalogoSubcategorias
  $Query = "
    SELECT
      su.Id, su.Nombre
    FROM CatalogoSubcategorias su
    WHERE su.Fk_Categoria = '$val'
    ORDER BY su.Nombre ASC
  ";
  $Subs = $mysqli->query($Query);
?>
<option value=""></option>
<?php
  mysqli_data_seek($Subs, 0);
  while($Sub = mysqli_fetch_array($Subs)) {
?>
  <option value="<?php echo $Sub['Id']; ?>"><?php echo $Sub['Nombre'];?></option>
<?php
  }
  //require_once($Position.'config/cerrarconexion.php');
?>
