title: How to pass two values from two relates tables to another page using anchor tag
body: <p>I have two tables which are Order Table and Seller Table that looks something like this</p>
  <p><a href="https://i.stack.imgur.com/VJSak.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/VJSak.png" alt="enter image description here" /></a></p>
  <p>I tried to <code>LEFT JOIN</code> the two tables so I can get the details of the seller in the <code>Order Table</code>.</p>
  <p>I have a problem now, how can i pass the value of <code>seller_id</code> and also the <code>order_date</code> from the order table according to the selected values. I want to pass the two values to the <code>report-summary.php</code> using anchor tag.
  For example if I select seller <code>Mark</code> it will fetch the <code>seller_id=1</code>and <code>month= 2021-03</code>( this is the date from order table). How can i achieve this?</p>
  <p>It would be better if you guys can show me examples of code on how to solve this. Thank you so much in advance any help will be appreciated!</p>
  <p>I tried the codes below all i get is empty values. where the URL shows:</p>
  <p><code>http://localhost/myfile/admin/report-summary.php?sid=&amp;month=</code></p>
  <pre><code>&lt;div class=&quot;row&quot;&gt;
                    &lt;div class=&quot;col-4 my-auto&quot;&gt;
                      &lt;input type=&quot;month&quot; id=&quot;month&quot; class=&quot;form-control&quot; value=&quot;&lt;?php echo date('Y-m'); ?&gt;&quot;&gt;
                    &lt;/div&gt;
                    &lt;div class=&quot;col-4 my-auto&quot;&gt;
                      &lt;select class=&quot;form-control&quot; id=&quot;seller&quot;&gt;
                        &lt;option value=&quot;&quot;&gt;Select All&lt;/option&gt;
                        &lt;?php
                        $sql = &quot;SELECT * FROM seller ORDER BY seller_register&quot;;
  
                        $query = $conn-&gt;query($sql);
                        while ($row = $query-&gt;fetch_assoc()) {
                         
                        ?&gt;
                        &lt;option value=&quot;&lt;?php echo $row['id'];?&gt;&quot;&gt;&lt;?php echo $row['seller_name'];?&gt;&lt;/option&gt;
                        &lt;?php } ?&gt;
                      &lt;/select&gt;
                    &lt;/div&gt;
                    &lt;div class=&quot;col-4 my-auto&quot;&gt;
                      &lt;button type=&quot;button&quot; class=&quot;btn btn-info&quot; onclick=&quot;loadreport();&quot;&gt;
                        &lt;i class=&quot;nc-icon nc-zoom-split&quot;&gt;&lt;/i&gt;
                      &lt;/button&gt;
                    &lt;/div&gt;
                    &lt;?php
                        $sql=&quot;SELECT * FROM order LEFT JOIN seller ON ordert.seller_id = sellert.id ORDER BY seller_register&quot;;
                      $query = $conn-&gt;query($sql);
                      $row = $query-&gt;fetch_assoc();
                      $seller_id= $row['seller_id'];
                      $month= date('Y-m');
  
                      if(isset($_POST['seller'])) {
                        $seller_id = $_POST['seller_id'];
                        $month = date('Y-m');
                      }
                      else{
                        $seller_id = '';
                        $month ='';
                      }
                        echo '
                        &lt;a href=&quot;report-summary.php?sid='.$seller_id.'&amp;month='.$month.'&quot;&gt;
                          &lt;button type=&quot;button&quot; class=&quot;btn btn-info&quot; style=&quot;height: 34px;&quot;&gt;
                            &lt;i class=&quot;fa fa-file-excel-o&quot;&gt;&lt;/i&gt; &amp;nbsp;Export to Excel 
                          &lt;/button&gt;
                        &lt;/a&gt;';
                      
                        ?&gt;
  </code></pre>