title: How to show the form based on subcategory
body: <p><img src="https://i.stack.imgur.com/vt2oq.png" alt="enter image description here">
  sub_cat table like BTech Tuition (Chemical Engineering),BTech Tuition (Civil Engineering).In this table you see pid is the parent_cat primarykey and cid is the child_cat table primary key the two id are passing to sub_cat .</p>
  
  <p>Here is my code for showing form based on category id:</p>
  
  <pre><code>if(isset($_POST['submit']))
  {
     $category=$_POST['category'];
     $query=mysql_query("select * from child_cat c where c.cid='".$category."'");
    while($row=mysql_fetch_assoc($query))
    {
      $cid=$row['cid'];
      $ch_cat=$row['ch_cat'];
    }
  }
  $sqlsubject=mysql_query("select * from sub_cat c where c.cid='".$cid."'");
  while($row=mysql_fetch_assoc($sqlsubject))
  {
  ?&gt;
  &lt;input type='checkbox' name='subject[]' value=&lt;?php echo $row['sub_cat'];?&gt;&gt;        
  &lt;?php echo $row['sub_cat'];?&gt;&lt;br/&gt;
  &lt;?php
  }
  ?&gt;
  </code></pre>
  
  <p>Myquestion is:
  1.How do i separate the form based on cid in sub_Cat table.
  This form is for class I_V,classI-VIII, Class IX-X. if they select classI_V I want to show this form. 
  select medium:</p>
  
  <pre><code>&lt;input type="checkbox" name="regional[]" id="hind" value="hindi" required&gt;Hindi
  &lt;input type="checkbox" name="regional[]" id="eng" value="english"&gt;English
  &lt;input type="checkbox" name="regional[]" id="reg" value="regional"&gt;Regional Language
  </code></pre>
  
  <p>2.for btech this  select medium is not required.</p>