title: How to pass the selected value in dropdown in table to another page?
body: <p>In this code, I have 2 dropdowns in the table (one is the options from MySQL and I checked the condition for options) and I want to pass their values for each row to the next page when I push the button &quot;call&quot; in that row.</p>
  <p>So, how can I do this?</p>
  <pre><code>&lt;table class=&quot;table-info&quot;&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;HN number&lt;/th&gt;
              &lt;th&gt;name&lt;/th&gt;
              &lt;th&gt;surname&lt;/th&gt;
              &lt;th&gt;gender&lt;/th&gt;
              &lt;th&gt;date of birth&lt;/th&gt;
              &lt;th&gt;claim&lt;/th&gt;
              &lt;th&gt;department&lt;/th&gt;
              &lt;th&gt;unit&lt;/th&gt;
              &lt;th&gt;tel&lt;/th&gt;
              &lt;th&gt;time&lt;/th&gt;
              &lt;th&gt;Actions&lt;/th&gt;
              
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;?php while($row = mysqli_fetch_assoc($result)) { ?&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;?php echo $row[&quot;hn&quot;] ?&gt;&lt;/td&gt;
              &lt;td&gt;&lt;?php echo $row[&quot;first_name&quot;] ?&gt;&lt;/td&gt;
              &lt;td&gt;&lt;?php echo $row[&quot;last_name&quot;] ?&gt;&lt;/td&gt;
              &lt;td&gt;&lt;?php echo $row[&quot;gender&quot;] ?&gt;&lt;/td&gt;
              &lt;td&gt;&lt;?php echo $row[&quot;DOB&quot;] ?&gt;&lt;/td&gt;
              &lt;td&gt;&lt;?php echo $row[&quot;claim&quot;] ?&gt;&lt;/td&gt;
              &lt;td&gt;&lt;?php echo $row[&quot;dept&quot;] ?&gt;&lt;/td&gt;
              &lt;td&gt;&lt;?php echo $row[&quot;unit&quot;] ?&gt;&lt;/td&gt;
              &lt;td&gt;&lt;?php echo $row[&quot;tel&quot;] ?&gt;&lt;/td&gt;
              &lt;td&gt;&lt;?php echo $row[&quot;q_time&quot;] ?&gt;&lt;/td&gt;
              &lt;td&gt;
                  &lt;div action = &quot;manage_db.php&quot; method=&quot;post&quot;&gt;
  
                      &lt;select class=&quot;select&quot; name=&quot;doc_drop&quot; &lt;?= ( $row[&quot;doc&quot;] == 'general' ? '' : 'disabled' ) ?&gt; require&gt;
                          &lt;option selected disabled&gt;doctor&lt;/option&gt;
                          &lt;?php foreach($result2 as $doc_select){?&gt;
                              &lt;option value=&quot;&lt;?php echo $doc_selectp[&quot;doc&quot;];?&gt;&quot; 
                              &lt;?= ( trim( $row[&quot;doc&quot;] ) == $doc_select[&quot;doc&quot;] ? 'selected' : '' ) ?&gt; &gt;                              
                                  &lt;?php echo $doc_select[&quot;doc&quot;];?&gt;
                              &lt;/option&gt;
                          &lt;?php } ?&gt;
                      &lt;/select&gt;
  
  
                      &lt;select  class=&quot;select&quot; name=&quot;room&quot; require&gt;
                      &lt;option  selected disabled&gt; room &lt;/option&gt;
                      &lt;option value=&quot;1&quot;&gt;room 1&lt;/option&gt;
                      &lt;option value=&quot;2&quot;&gt;room 2&lt;/option&gt;
                      &lt;option value=&quot;3&quot;&gt;room 3&lt;/option&gt;
                      &lt;option value=&quot;4&quot;&gt;room 4&lt;/option&gt;
                      &lt;option value=&quot;5&quot;&gt;room 5&lt;/option&gt;
                  
                       &lt;/select&gt;
  
                       &lt;a href=&quot;manage_db.php?hn_patient=&lt;?php echo $row[&quot;hn&quot;];?&gt;&quot; class = btn-call &gt;call&lt;/a&gt;
                      
                      &lt;/div&gt;
          
                  
              &lt;/td&gt;
          &lt;/tr&gt;
          &lt;?php } ?&gt;
      &lt;/tbody&gt;
  &lt;/table&gt;
  </code></pre>
  
  
  
  <p><a href="https://i.stack.imgur.com/vsdUg.png" rel="nofollow noreferrer">My website</a></p>