No. Here’s a snippet (all the PHP on my page so far).
$stmt = "SELECT * FROM `posts` WHERE `hp`='true'";
$res = $con->query($stmt);
if ($res->num_rows > 0) {
// output data of each row
while($row = $res->fetch_assoc()) {
$redactedHBody = substr($row["bodydata"], 0, 200);
echo '
<div class="hp-padding">
<div class="hot-post">
<img src="'.$row["image"].'" class="rp-img">
<div class="hp-ipadding">
<h1>'.$row["title"].'</h1>
<h3>Posted '.$row["date"].' '.$row["time"].'</h3>
<p>'.$redactedHBody.'...</p>
<h3><i class="fas fa-tags"></i> '.str_replace(',', ', ', $row["tags"]).'</h3>
<button class="hread r-animate" id="hb"><i class="fas fa-fire-alt"></i> Read More <i class="fas fa-fire-alt"></i></button>
</div>
</div>
</div>
';
}
} else {
echo "<h1>No posts</h1>";
}
?>
<div class="p-padding">
<?php
$stmt = "SELECT * FROM `posts` WHERE `hp`=''";
$res = $con->query($stmt);
if ($res->num_rows > 0) {
// output data of each row
while($row = $res->fetch_assoc()) {
$redactedBody = substr($row["bodydata"], 0, 200);
echo '
<div class="p-padding">
<div class="post">
<img src="'.$row["image"].'" class="rp-img">
<div class="p-ipadding">
<h1>'.$row["title"].'</h1>
<h3>Posted '.$row["date"].' '.$row["time"].'</h3>
<p>>'.$redactedBody.'...</p>
<button class="read">Read More</button>
<h3><i class="fas fa-tags"></i> '.str_replace(',', ', ', $row["tags"]).'</h3>
</div>
</div>
</div>
';
}
} else {
}