<?php



require('../../_app/Config.inc.php');



$categoria = (int) strip_tags(trim($_POST['categoria']));

$readSubcategories = new Read;

$readSubcategories->ExeRead("app_subcategorias", "WHERE categoria_id = :cat ORDER BY subcategoria_titulo ASC", "cat={$categoria}");



sleep(1);



echo "<option value=\"\" disabled selected> Selecione a subcategoria </option>";

foreach ($readSubcategories->getResult() as $subcategorias):

    extract($subcategorias);

    echo "<option value=\"{$subcategoria_id}\"> {$subcategoria_titulo} </option>";

endforeach;

