title: Open the form based on the value acquired from database
body: <p>I have a form <code>dashboard.php</code> which displays different records (sampleid, type, user). There are two more forms named <code>aba.php</code> and <code>babab.php</code>. There is a button named Update in <code>dashboard.php</code> in front of each record. </p>
  
  <p>When I click on that button it should open the perticular form based on the value of type. I tried the following code but this always open babab.php form. </p>
  
  <p>What is wrong with my code?</p>
  
  <pre><code>&lt;?php
     $type=$_GET['type'];
  
     if ($type =="WOOD") {
         $formid='aba-edit.php';} 
     elseif ($type=="BONE" OR 'CARBONATE' OR 'CELLULOSE'OR 'CHARCOL' OR 'CORAL'){
         $formid='babab-edit.php';}
     else {
         echo "Under Construction";}                                                 
  ?&gt;
  
  &lt;a onclick="window.open('aba-view.php?sampleid=&lt;?php echo htmlentities($result-&gt;sampleid);?&gt;','_blank','height=700,width=1200 top=200 left=350,location=no,toolbar=no,resizable=0, scrollbars=no')"&gt;
  &lt;button class="btn btn-primary"&gt;&lt;i class="fa fa-edit "&gt;&lt;/i&gt; VIEW&lt;/button&gt;
  
  &lt;a onclick="window.open('&lt;?php echo $formid ?&gt; ?sampleid=&lt;?php echo htmlentities($result-&gt;sampleid);?&gt;','_blank','height=700,width=1200 top=200 left=350,location=no,toolbar=no,resizable=no, scrollbars=no')"&gt;
  &lt;button class="btn btn-primary"&gt;&lt;i class="fa fa-edit "&gt;&lt;/i&gt; UPDATE&lt;/button&gt;
  
  </code></pre>