title: how to change dropdown value take from sql based on selected dropdown
body: <p>this is the dropdown select package category for eg. i select unifi it will hide all except unifi package list.. but when i select streamyx the selected unifi package list still not reset means i will submit unifi and streamyx</p>
  
  <pre><code>                &lt;form onsubmit="return validate()" name="registration" method="post" 
                     action="" class="form-horizontal form-label-left"&gt;
                     &lt;div class="form-group"&gt;
                        &lt;label class="control-label col-md-3 col-sm-3 col-xs-12" for="first-name"&gt; Package Category&lt;label style="color:red;"&gt;*&lt;/label&gt; : 
                        &lt;/label&gt; 
                        &lt;div class="col-md-6 col-sm-6 col-xs-12"&gt;
                           &lt;select name="PACKAGE_CATEGORY" class="form-control" onmousedown="this.value='';" onchange="jsFunction(this.value);" required id="streamSelect"&gt;
                              &lt;option disabled selected value&gt; -- select an option -- &lt;/option&gt;
                              &lt;option value="UNIFI"&gt;Unifi&lt;/option&gt;
                              &lt;option value="STREAMYX"&gt;Streamyx&lt;/option&gt;
                              &lt;option id="myDIV" value="WEBE"&gt;Webe&lt;/option&gt;
                              &lt;option id="myDIVA" value="LEASE LINE"&gt;Lease Line(DOME)&lt;/option&gt;
                           &lt;/select&gt;
                        &lt;/div&gt;
                     &lt;/div&gt;
                     &lt;div class="form-group" id="beb"&gt;
                        &lt;label class="control-label col-md-3 col-sm-3 col-xs-12" for="first-name"&gt; Package List : 
                        &lt;/label&gt; 
                        &lt;div class="col-md-6 col-sm-6 col-xs-12"&gt;
                           &lt;select name="PACKAGE_ID_UNIFI" class="form-control" onmousedown="this.value='';" onchange="jsFunction(this.value);"&gt;
                              &lt;option disabled selected value&gt; -- select an option -- &lt;/option&gt;
                              &lt;?php 
                                 $result = mysqli_query($conn,"select * from unifi ORDER BY PACKAGE_NAME ASC"); 
                                 while ($row=mysqli_fetch_assoc($result)) 
                                 {?&gt; 
                              &lt;option value="&lt;?php echo $row["no"]; ?&gt;"&gt; &lt;?php echo $row["PACKAGE_NAME"]; ?&gt;&lt;/option&gt;
                              &lt;?php 
                                 } 
                                 ?&gt; 
                           &lt;/select&gt;
                        &lt;/div&gt;
                     &lt;/div&gt;
                     &lt;div class="form-group" id="bob"&gt;
                        &lt;label class="control-label col-md-3 col-sm-3 col-xs-12" for="first-name"&gt; Package List : 
                        &lt;/label&gt; 
                        &lt;div class="col-md-6 col-sm-6 col-xs-12"&gt;
                           &lt;select name="PACKAGE_ID_STREAMYX" class="form-control" onmousedown="this.value='';" onchange="jsFunction(this.value);" &gt;
                              &lt;option disabled selected value&gt; -- select an option -- &lt;/option&gt;
                              &lt;?php 
                                 $result = mysqli_query($conn,"select * from streamyx ORDER BY PACKAGE_NAME ASC"); 
                                 while($row=mysqli_fetch_assoc($result)) 
                                 {?&gt; 
                              &lt;option value="&lt;?php echo $row["PACKAGE_NAME"]; ?&gt;"&gt; &lt;?php echo $row["PACKAGE_NAME"]; ?&gt;&lt;/option&gt;
                              &lt;?php 
                                 } 
                                 ?&gt; 
                           &lt;/select&gt;
                        &lt;/div&gt;
                     &lt;/div&gt;
                     &lt;div class="form-group" id="kok"&gt;
                        &lt;label class="control-label col-md-3 col-sm-3 col-xs-12" for="first-name"&gt; Package List : 
                        &lt;/label&gt; 
                        &lt;div class="col-md-6 col-sm-6 col-xs-12"&gt;
                           &lt;select name="PACKAGE_ID_WEBE" class="form-control" onmousedown="this.value='';" onchange="jsFunction(this.value);" &gt;
                              &lt;option disabled selected value&gt; -- select an option -- &lt;/option&gt;
                              &lt;?php 
                                 $result = mysqli_query($conn,"select * from webe ORDER BY PACKAGE_NAME ASC"); 
                                 while($row=mysqli_fetch_assoc($result)) 
                                 {?&gt; 
                              &lt;option value="&lt;?php echo $row["PACKAGE_NAME"]; ?&gt;"&gt; &lt;?php echo $row["PACKAGE_NAME"]; ?&gt;&lt;/option&gt;
                              &lt;?php 
                                 } 
                                 ?&gt; 
                           &lt;/select&gt;
                        &lt;/div&gt;
                     &lt;/div&gt;
                     &lt;div class="form-group" id="joj"&gt;
                        &lt;label class="control-label col-md-3 col-sm-3 col-xs-12" for="first-name"&gt; Package List : 
                        &lt;/label&gt; 
                        &lt;div class="col-md-6 col-sm-6 col-xs-12"&gt;
                           &lt;select name="PACKAGE_ID_DOME" class="form-control" onmousedown="this.value='';" onchange="jsFunction(this.value);" &gt;
                              &lt;option disabled selected value&gt; -- select an option -- &lt;/option&gt;
                              &lt;?php 
                                 $result = mysqli_query($conn,"select * from dome ORDER BY PACKAGE_NAME ASC"); 
                                 while($row=mysqli_fetch_assoc($result)) 
                                 {?&gt; 
                              &lt;option value="&lt;?php echo $row["PACKAGE_NAME"]; ?&gt;"&gt; &lt;?php echo $row["PACKAGE_NAME"]; ?&gt;&lt;/option&gt;
                              &lt;?php 
                                 } 
                                 ?&gt; 
                           &lt;/select&gt;
                        &lt;/div&gt;
                     &lt;/div&gt;
                     &lt;button type="submit" class="btn btn-success" name="subtn"&gt;Submit&lt;/button&gt; 
                  &lt;/form&gt;
  </code></pre>
  
  <p>this is my javascript to hide the certain id </p>
  
  <pre><code>            &lt;script&gt; 
          function jsFunction(value) 
          { 
          var a = document.getElementById('beb'); 
          if ((value) == 'UNIFI') 
          { 
          a.style.display = ''; 
          } 
          else if((value) == 'STREAMYX') 
          { 
          a.style.display = 'none'; 
          a.value = ''; 
          } 
          else if((value) == 'WEBE') 
          { 
          a.style.display = 'none'; 
          a.value = ''; 
          } 
          else if((value) == 'LEASE LINE') 
          { 
          a.style.display = 'none'; 
          a.value = ''; 
          } 
          var a = document.getElementById('bob'); 
          if ((value) == 'UNIFI') 
          { 
          a.style.display = 'none'; 
          a.value = ''; 
          } 
          else if((value) == 'STREAMYX') 
          { 
          a.style.display = ''; 
          } 
          else if((value) == 'WEBE') 
          { 
          a.style.display = 'none'; 
          a.value = ''; 
          } 
          else if((value) == 'LEASE LINE') 
          { 
          a.style.display = 'none'; 
          a.value = ''; 
          } 
          var a = document.getElementById('kok'); 
          if ((value) == 'UNIFI') 
          { 
          a.style.display = 'none'; 
          } 
          else if((value) == 'STREAMYX') 
          { 
          a.style.display = 'none'; 
          } 
          else if((value) == 'WEBE') 
          { 
          a.style.display = ''; 
          } 
          else if((value) == 'LEASE LINE') 
          { 
          a.style.display = 'none'; 
          } 
          var a = document.getElementById('joj'); 
          if ((value) == 'UNIFI') 
          { 
          a.style.display = 'none'; 
          } 
          else if((value) == 'STREAMYX') 
          { 
          a.style.display = 'none'; 
          } 
          else if((value) == 'WEBE') 
          { 
          a.style.display = 'none'; 
          } 
          else if((value) == 'LEASE LINE') 
          { 
          a.style.display = ''; 
          } 
          }
          &lt;/script&gt;
  </code></pre>