<?php 
include($_SERVER["DOCUMENT_ROOT"].'/anunturi/config/loadconfig.php');
$cat_id = $_POST['cat_id'];
$qsc = "SELECT * FROM `scategorii` WHERE `cat_id`='".$cat_id."' ORDER BY `scat_id` ASC";
$res = $dbc->query($qsc);
echo "<option selected=\"\" disabled=\"\">Selectați subcategoria</option>"; 
while($r = $res->fetch_array()){
echo "<option value='".$r['scat_id']."'>".$r['titlu']."</option>";          
}
?>