prepare($sql); $stmt->bindValue(':search','%'.$Search.'%'); $stmt->execute(); }// Query When Pagination is Active i.e Blog.php?page=1 elseif (isset($_GET["page"])) { $Page = $_GET["page"]; if($Page==0||$Page<1){ $ShowPostFrom=0; }else{ $ShowPostFrom=($Page*5)-5; } $sql ="SELECT * FROM posts ORDER BY id desc LIMIT $ShowPostFrom,5"; $stmt=$ConnectingDB->query($sql); } // Query When Category is active in URL Tab elseif (isset($_GET["category"])) { $Category = $_GET["category"]; $sql = "SELECT * FROM posts WHERE category='$Category' ORDER BY id desc"; $stmt=$ConnectingDB->query($sql); } // The default SQL query else{ $sql = "SELECT * FROM posts ORDER BY id desc LIMIT 0,3"; $stmt =$ConnectingDB->query($sql); } while ($DataRows = $stmt->fetch()) { $PostId = $DataRows["id"]; $DateTime = $DataRows["datetime"]; $PostTitle = $DataRows["title"]; $Category = $DataRows["category"]; $Admin = $DataRows["author"]; $Image = $DataRows["image"]; $PostDescription = $DataRows["post"]; ?>

150) { $PostDescription = substr($PostDescription,0,150)."...";} echo htmlentities($PostDescription); ?>

Read More ⟩⟩