<?php

include("../myclass.php");
$obj = new myclass();

if(isset($_POST["cat_id"])){
    $data = $obj->fetchcategory($_POST["cat_id"]);
    $html = "";
    foreach($data as $key){
        $html .= "<option value='".$key["id"]."'>". $key["title"] ."</option>";
    }
    echo $html;
}
?>