Use an html tag that is in a Mysql database on a page

Asked

Viewed 58 times

0

I inserted the following direct tag into the bank

<iframe width="962" height="541" src="https://www.youtube.com/embed/w2Ov5jzm3j8" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>

But when it comes to using it on a page I’m not getting it

    <div class="col-sm-12">
        <?php
        $sql = "SELECT ofe.ofeVideo FROM tbloferta ofe WHERE ofe.ofeVideo != null";
        $query = $conn->query($sql);
        while ($row = $query->fetch_array()) {
          $ofeVideo = $row['ofeVideo'];
          echo htmlentities($ofeVideo);
        }
        ?>  
    </div>

1 answer

1


instead of using the sql command != for different, I switched to is not was like this:

SELECT ofeVideo FROM tbloferta WHERE ofeVideo is not null;

Browser other questions tagged

You are not signed in. Login or sign up in order to post.