Created
May 26, 2018 16:49
-
-
Save hackerrahul/398ca43e7b2a90509b87a132d3b79860 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
include 'db.php'; | |
if (isset($_GET['offset']) && isset($_GET['limit'])) { | |
$offset = $_GET['offset']; | |
$limit = $_GET['limit']; | |
$data = mysqli_query($conn, "SELECT * FROM infinite_scroll_post LIMIT {$limit} OFFSET {$offset}"); | |
while($row = mysqli_fetch_array($data)){ | |
echo "<div class='w3-card-4' > | |
<header class='w3-container w3-blue'> | |
<a href='".$row['url']."' title='".$row['title']."'><h1>".$row['title']."</h1></a> | |
</header> | |
<div class='w3-container'> | |
<h1>".$row['body']."</h1> </div> | |
</div><br><br> | |
"; | |
} | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment