Result does not fetch according to the condition set

Discussion in 'Web Development' started by shawn, Sep 12, 2021.

  1. shawn

    shawn New Member

    Joined:
    Sep 9, 2021
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    Gender:
    Female
    I’m creating dynamic tabs with dynamic content by using Bootstrap in PHP Mysql. what I want to do here is, display the order_date on the nav-tab and the content of each nav-tab will be displayed by the date of the customer made their orders. The date in each nav-tab can be shown properly according to the condition set, but the content of each nav-tab does not show according to the condition set. It just displays all of the data. Can I know how can I display the content according to the condition set? Let’s say I clicked on the ‘2021-09-09’ tab, the order that is only made on this date will be shown as the content of this nav_tab. Any form of help will be appreciated. thanks in advance!

    PHP:
    <div class="col-12">
      <div class="card">
        <div class="card-header">
          <h4 class="card-title"> All Products</h4>
          <span>
            <a href="download-list/download-products.php" class="btn btn-info float-right mb-3"><i class="fa fa-download" aria-hidden="true"></i> Download Products List</a>
          </span>
          <span>
            <a href="download-list/download-products.php" class="btn btn-info float-right mb-3"><i class="fa fa-download" aria-hidden="true"></i> Download Products List</a>
          </span>
        </div>
          <div class="card-body">
          <ul class="nav nav-tabs">
          <li class="nav-item">
        <ul class="nav nav-tabs">
        <?php echo $tab_menu?>
        </ul>
          </li>
          </ul>
          </div>

          <div class="card-body">
                    <div class="table-responsive" style="max-height: 70vh">
                      <table class="table">
                        <thead class="text-primary">
                          <th style=" position: sticky;top: 0; background: white" ;>
                            Order no
                          </th>
                          <th style=" position: sticky;top: 0; background: white" ;>
                            Product Name
                          </th>
                          <th style=" position: sticky;top: 0; background: white" ;>
                            Quantity
                          </th>
                          <th style=" position: sticky;top: 0; background: white" ;>
                            Order Date
                          </th>
                          <th style=" position: sticky;top: 0; background: white" ;>
                            Recieve by
                          </th>
                              <tr>
                              <?php echo $tab_content?>
                              </tr>
                      
                        </tbody>
                      </table>
                    </div>
                  </div>
     
    Last edited: Sep 12, 2021
  2. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,355
    Likes Received:
    383
    Trophy Points:
    83
    Can you share the content of the variable $tab_content because it looks like if the tab content is not right means that variable doesn't have the format that the HTML requires for each of the tab content.
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice