php – HTML Content not showing up despite appearing in the html source-ThrowExceptions

Exception or error:

I have a php file called randompage.php which will display all laptops based on the user’s selection on the sidebar. If user ticks Microsoft, all Microsoft laptops will appear. I think it may have something to do with CSS, but I’m not sure.

randompage.php

<section class="products bg-light">

<section class="display_product row">

</section>

<section class="product_filter">
<section class="sidebar-box-2">

 <h2 class="heading mb-8">Brand</h2>
 <section class="product-filter-item checkbox">
 <label><input type="checkbox" class="common_selector brand" value="<?php
 echo sanitize($brand);?>"> <?php echo sanitize($brand);?></label>
 </section>

 </section>
 </section>
 </section>

fetch_data.php

if (
   $selectproductsstatement &&
   $selectproductsstatement->execute() &&
   $selectproductsstatement->store_result()&&
   $selectproductsstatement->bind_result($product_name,$brand,$processor,$os,$memory,$hard_disk,$battery,$weight,$price)
    ) {
    while ($selectproductsstatement->fetch()) {
    $output .= '<dl class="product col-sm-6 col-md-6 col-lg-4 ftco-animate">//Huge chunk of content';</dl>
           }
      }

else
{
    $output = 'No Data Found';
}
echo $output;

CSS:

section.products.bg-light {
    padding: 5%;
    padding-bottom: 15%;
    display: inherit;
}
section.display_product {
    width: 85%;
    float: right;
}

section.product_filter {
    width: 15%;
}

Data being written into section.display_product.row

enter image description here

Empty page:
enter image description here

How to solve:

your dl elements are using this class .ftco-animate it sets the opactiy: 0; and visibility: hidden;

This hides the images and text for your products.

Remove the class for showing your products.

.ftco-animate {
    opacity: 0;
    visibility: hidden;
}

Leave a Reply

Your email address will not be published. Required fields are marked *