<?php
include 'load.php';

if(isset($_POST['inputcategory'])){
    $category = $_POST['inputcategory'];

    $sql = "SELECT * FROM mobilesubcategory WHERE category='$category'";
    $result = $conn->query($sql);


    if ($result->num_rows > 0) {
        while($row = $result->fetch_assoc()) {
            echo "<option value='".$row['sbid']."'>".$row['subname']."</option>";
        }
    }

}

?>